Skip to content

Commit 96629d5

Browse files
nikomatsakisbrson
authored andcommitted
move rand functions into c-stack-cdecl mode
1 parent 35e01e0 commit 96629d5

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/lib/rand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/**
55
* Bindings the runtime's random number generator (ISAAC).
66
*/
7-
native "rust" mod rustrt {
7+
native "c-stack-cdecl" mod rustrt {
88
type rctx;
99
fn rand_new() -> rctx;
1010
fn rand_next(c: rctx) -> u32;

src/rt/rust_builtin.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,22 @@ rand_new() {
160160
}
161161

162162
extern "C" CDECL size_t
163+
<<<<<<< HEAD
163164
rand_next(randctx *rctx) {
165+
=======
166+
rand_next(randctx *rctx)
167+
{
168+
>>>>>>> move rand functions into c-stack-cdecl mode
164169
return isaac_rand(rctx);
165170
}
166171

167172
extern "C" CDECL void
173+
<<<<<<< HEAD
168174
rand_free(randctx *rctx) {
175+
=======
176+
rand_free(randctx *rctx)
177+
{
178+
>>>>>>> move rand functions into c-stack-cdecl mode
169179
rust_task *task = rust_scheduler::get_task();
170180
task->free(rctx);
171181
}

0 commit comments

Comments
 (0)