From 291df4d73287b80764a5d42e71ab7fec31e3f3c3 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 5 Jul 2011 14:28:50 -0700 Subject: [PATCH] rt: Add missing CDECL to routines in rust_builtin --- src/rt/rust_builtin.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 0ccc83435f7..6438c549c55 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -621,7 +621,7 @@ nano_time(rust_task *task, uint64_t *ns) { /** * Preallocates the exact number of bytes in the given interior vector. */ -extern "C" void +extern "C" CDECL void ivec_reserve(rust_task *task, type_desc *ty, rust_ivec *v, size_t n_elems) { size_t new_alloc = n_elems * ty->size; @@ -652,7 +652,7 @@ ivec_reserve(rust_task *task, type_desc *ty, rust_ivec *v, size_t n_elems) * Returns true if the given vector is on the heap and false if it's on the * stack. */ -extern "C" bool +extern "C" CDECL bool ivec_on_heap(rust_task *task, type_desc *ty, rust_ivec *v) { return !v->fill && v->payload.ptr; @@ -661,7 +661,7 @@ ivec_on_heap(rust_task *task, type_desc *ty, rust_ivec *v) /** * Returns an unsafe pointer to the data part of an interior vector. */ -extern "C" void * +extern "C" CDECL void * ivec_to_ptr(rust_task *task, type_desc *ty, rust_ivec *v) { return v->fill ? v->payload.data : v->payload.ptr->data; @@ -681,7 +681,7 @@ get_ivec_size(rust_ivec *v) * Copies elements in an unsafe buffer to the given interior vector. The * vector must have size zero. */ -extern "C" void +extern "C" CDECL void ivec_copy_from_buf(rust_task *task, type_desc *ty, rust_ivec *v, void *ptr, size_t count) { @@ -706,12 +706,12 @@ ivec_copy_from_buf(rust_task *task, type_desc *ty, rust_ivec *v, void *ptr, v->payload.ptr->fill = new_size; } -extern "C" void +extern "C" CDECL void pin_task(rust_task *task) { task->pin(); } -extern "C" void +extern "C" CDECL void unpin_task(rust_task *task) { task->unpin(); }