Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 500912e2a -> 8d3ae8b05


Fix TestUtils when there's no thread support


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/a6a99fa5
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/a6a99fa5
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/a6a99fa5

Branch: refs/heads/master
Commit: a6a99fa50249a207bca3b328336c52a7f80d8577
Parents: 500912e
Author: Nick Wellnhofer <[email protected]>
Authored: Mon May 18 20:59:14 2015 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Mon May 18 21:21:26 2015 +0200

----------------------------------------------------------------------
 runtime/core/Clownfish/TestHarness/TestUtils.c |  4 +++-
 runtime/perl/xs/XSBind.c                       | 23 +++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a6a99fa5/runtime/core/Clownfish/TestHarness/TestUtils.c
----------------------------------------------------------------------
diff --git a/runtime/core/Clownfish/TestHarness/TestUtils.c 
b/runtime/core/Clownfish/TestHarness/TestUtils.c
index 5c254bd..2b5698a 100644
--- a/runtime/core/Clownfish/TestHarness/TestUtils.c
+++ b/runtime/core/Clownfish/TestHarness/TestUtils.c
@@ -308,9 +308,11 @@ TestUtils_thread_join(Thread *thread) {
 bool TestUtils_has_threads = false;
 
 Thread*
-TestUtils_thread_create(thread_routine_t routine, void *arg) {
+TestUtils_thread_create(thread_routine_t routine, void *arg,
+                        void *host_runtime) {
     UNUSED_VAR(routine);
     UNUSED_VAR(arg);
+    UNUSED_VAR(host_runtime);
     THROW(ERR, "No thread support");
     UNREACHABLE_RETURN(Thread*);
 }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/a6a99fa5/runtime/perl/xs/XSBind.c
----------------------------------------------------------------------
diff --git a/runtime/perl/xs/XSBind.c b/runtime/perl/xs/XSBind.c
index 034c14a..00cb056 100644
--- a/runtime/perl/xs/XSBind.c
+++ b/runtime/perl/xs/XSBind.c
@@ -1052,6 +1052,9 @@ cfish_Err_trap(CFISH_Err_Attempt_t routine, void 
*context) {
 
 /********************* Clownfish::TestHarness::TestUtils ********************/
 
+
+#ifndef CFISH_NOTHREADS
+
 void*
 cfish_TestUtils_clone_host_runtime() {
     PerlInterpreter *interp = (PerlInterpreter*)PERL_GET_CONTEXT;
@@ -1072,3 +1075,23 @@ cfish_TestUtils_destroy_host_runtime(void *runtime) {
     perl_free(interp);
 }
 
+#else /* CFISH_NOTHREADS */
+
+void*
+cfish_TestUtils_clone_host_runtime() {
+    CFISH_THROW(CFISH_ERR, "No thread support");
+    CFISH_UNREACHABLE_RETURN(void*);
+}
+
+void
+cfish_TestUtils_set_host_runtime(void *runtime) {
+    CFISH_THROW(CFISH_ERR, "No thread support");
+}
+
+void
+cfish_TestUtils_destroy_host_runtime(void *runtime) {
+    CFISH_THROW(CFISH_ERR, "No thread support");
+}
+
+#endif
+

Reply via email to