mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-10 06:47:34 +00:00
std: add ll::loop_refcount binding for uv_loop_refcount
This commit is contained in:
parent
e348567f77
commit
fbaba0f404
@ -512,6 +512,7 @@ mod uv_ll_struct_stubgen {
|
||||
native mod rustrt {
|
||||
fn rust_uv_loop_new() -> *libc::c_void;
|
||||
fn rust_uv_loop_delete(lp: *libc::c_void);
|
||||
fn rust_uv_loop_refcount(loop_ptr: *libc::c_void) -> libc::c_int;
|
||||
fn rust_uv_run(loop_handle: *libc::c_void);
|
||||
fn rust_uv_close(handle: *libc::c_void, cb: *u8);
|
||||
fn rust_uv_async_send(handle: *uv_async_t);
|
||||
@ -601,6 +602,10 @@ unsafe fn loop_delete(loop_handle: *libc::c_void) {
|
||||
rustrt::rust_uv_loop_delete(loop_handle);
|
||||
}
|
||||
|
||||
unsafe fn loop_refcount(loop_ptr: *libc::c_void) -> libc::c_int {
|
||||
ret rustrt::rust_uv_loop_refcount(loop_ptr);
|
||||
}
|
||||
|
||||
unsafe fn run(loop_handle: *libc::c_void) {
|
||||
rustrt::rust_uv_run(loop_handle);
|
||||
}
|
||||
|
@ -111,6 +111,11 @@ rust_uv_loop_delete(uv_loop_t* loop) {
|
||||
uv_loop_delete(loop);
|
||||
}
|
||||
|
||||
extern "C" int
|
||||
rust_uv_loop_refcount(uv_loop_t* loop) {
|
||||
return uv_loop_refcount(loop);
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
rust_uv_loop_set_data(uv_loop_t* loop, void* data) {
|
||||
loop->data = data;
|
||||
|
@ -86,6 +86,7 @@ upcall_del_stack
|
||||
upcall_reset_stack_limit
|
||||
rust_uv_loop_new
|
||||
rust_uv_loop_delete
|
||||
rust_uv_loop_refcount
|
||||
rust_uv_loop_set_data
|
||||
rust_uv_bind_op_cb
|
||||
rust_uv_stop_op_cb
|
||||
|
Loading…
Reference in New Issue
Block a user