mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-10 02:56:52 +00:00
move rand functions into c-stack-cdecl mode
This commit is contained in:
parent
35e01e0137
commit
96629d5c21
@ -4,7 +4,7 @@
|
||||
/**
|
||||
* Bindings the runtime's random number generator (ISAAC).
|
||||
*/
|
||||
native "rust" mod rustrt {
|
||||
native "c-stack-cdecl" mod rustrt {
|
||||
type rctx;
|
||||
fn rand_new() -> rctx;
|
||||
fn rand_next(c: rctx) -> u32;
|
||||
|
@ -160,12 +160,22 @@ rand_new() {
|
||||
}
|
||||
|
||||
extern "C" CDECL size_t
|
||||
<<<<<<< HEAD
|
||||
rand_next(randctx *rctx) {
|
||||
=======
|
||||
rand_next(randctx *rctx)
|
||||
{
|
||||
>>>>>>> move rand functions into c-stack-cdecl mode
|
||||
return isaac_rand(rctx);
|
||||
}
|
||||
|
||||
extern "C" CDECL void
|
||||
<<<<<<< HEAD
|
||||
rand_free(randctx *rctx) {
|
||||
=======
|
||||
rand_free(randctx *rctx)
|
||||
{
|
||||
>>>>>>> move rand functions into c-stack-cdecl mode
|
||||
rust_task *task = rust_scheduler::get_task();
|
||||
task->free(rctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user