diff options
| author | Jeff Olson <olson.jeffery@gmail.com> | 2012-03-22 11:48:40 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-04-06 15:35:48 -0700 |
| commit | 43c82bdb453523be57512c91d267bac05018ed19 (patch) | |
| tree | a3d099d0fc03a6c95fefee93e223bf2a190704b3 /src/libstd | |
| parent | f179029296b8b8cf90b2b4e1a0cdd448e74e2a7d (diff) | |
| download | rust-43c82bdb453523be57512c91d267bac05018ed19.tar.gz rust-43c82bdb453523be57512c91d267bac05018ed19.zip | |
fixed passing in uv_buf_t ptr array in uv_write.. return status 0
ways to go, still..
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/uv.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libstd/uv.rs b/src/libstd/uv.rs index 906771d53c8..30c8cbd9c4e 100644 --- a/src/libstd/uv.rs +++ b/src/libstd/uv.rs @@ -282,7 +282,7 @@ native mod rustrt { addr: *libc::c_void, after_cb: *u8) -> libc::c_int; fn rust_uv_write(req: *libc::c_void, stream: *libc::c_void, - buf_in: *uv_buf_t, buf_cnt: libc::c_int, + buf_in: **libc::c_void, buf_cnt: libc::c_int, cb: *u8) -> libc::c_int; // sizeof testing helpers @@ -336,8 +336,11 @@ mod direct { address, after_connect_cb); } + // TODO github #1402 -- the buf_in is a vector of pointers + // to malloc'd buffers .. these will have to be translated + // back into their value types in c. sigh. unsafe fn write(req: *libc::c_void, stream: *libc::c_void, - buf_in: *[uv_buf_t], cb: *u8) -> libc::c_int { + buf_in: *[*libc::c_void], cb: *u8) -> libc::c_int { let buf_ptr = vec::unsafe::to_ptr(*buf_in); let buf_cnt = vec::len(*buf_in) as i32; ret rustrt::rust_uv_write(req, stream, buf_ptr, buf_cnt, cb); @@ -945,7 +948,7 @@ fn test_uv_timer() { type request_wrapper = { write_req: *uv_write_t, - req_buf: *[uv_buf_t] + req_buf: *[*libc::c_void] }; crust fn on_alloc(handle: *libc::c_void, |
