diff options
author | Bert Belder <bertbelder@gmail.com> | 2018-10-08 17:49:48 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2018-10-08 18:10:28 +0200 |
commit | ad4c4c214ab89cb5049525ad60ef9667925373cb (patch) | |
tree | f1560292bd4755f06fa939698ce99e6fc0bd27a6 /src | |
parent | 14b971c5f78e2bf3ce33dedeaec0133f5c7fabd0 (diff) |
Rename Deno.data to Deno.user_data
Also use the correct rust type for it.
Diffstat (limited to 'src')
-rw-r--r-- | src/isolate.rs | 5 | ||||
-rw-r--r-- | src/libdeno.rs | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/isolate.rs b/src/isolate.rs index bc7faafa6..c8e962f34 100644 --- a/src/isolate.rs +++ b/src/isolate.rs @@ -102,10 +102,7 @@ impl Isolate { }); (*isolate).libdeno_isolate = unsafe { - libdeno::deno_new( - isolate.as_ref() as *const _ as *const c_void, - pre_dispatch, - ) + libdeno::deno_new(isolate.as_mut() as *mut _ as *mut c_void, pre_dispatch) }; isolate diff --git a/src/libdeno.rs b/src/libdeno.rs index c7a03e3bb..b48ddd166 100644 --- a/src/libdeno.rs +++ b/src/libdeno.rs @@ -30,10 +30,10 @@ extern "C" { pub fn deno_init(); pub fn deno_v8_version() -> *const c_char; pub fn deno_set_v8_flags(argc: *mut c_int, argv: *mut *mut c_char); - pub fn deno_new(data: *const c_void, cb: DenoRecvCb) -> *const isolate; + pub fn deno_new(user_data: *mut c_void, cb: DenoRecvCb) -> *const isolate; pub fn deno_delete(i: *const isolate); pub fn deno_last_exception(i: *const isolate) -> *const c_char; - pub fn deno_get_data(i: *const isolate) -> *const c_void; + pub fn deno_get_data(i: *const isolate) -> *mut c_void; pub fn deno_respond(i: *const isolate, req_id: i32, buf: deno_buf); pub fn deno_execute( i: *const isolate, |