about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorMarijn Haverbeke <marijnh@gmail.com>2011-10-20 12:32:43 +0200
committerMarijn Haverbeke <marijnh@gmail.com>2011-10-20 14:22:17 +0200
commit457683c7feef42f07f3044ccfdc8ee7816176ab0 (patch)
tree4e8fe9608e807fa86ae14b839fb2fac7d4cfc20f /src/rt/rust_upcall.cpp
parent6323a012bd1417451cd81f00679039d630dc1695 (diff)
downloadrust-457683c7feef42f07f3044ccfdc8ee7816176ab0.tar.gz
rust-457683c7feef42f07f3044ccfdc8ee7816176ab0.zip
Do not pass taskpointers to "rust" native functions
Issue #466
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index aaa738c2fd4..516de91dd5f 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -45,10 +45,10 @@ copy_elements(rust_task *task, type_desc *elem_t,
 }
 
 extern "C" CDECL void
-upcall_fail(rust_task *task,
-            char const *expr,
+upcall_fail(char const *expr,
             char const *file,
             size_t line) {
+    rust_task *task = rust_scheduler::get_task();
     LOG_UPCALL_ENTRY(task);
     LOG_ERR(task, upcall, "upcall fail '%s', %s:%" PRIdPTR, expr, file, line);
     task->fail();