DLLEXPORT void jl_uv_alloc_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t* buf) { if (handle->data) { JULIA_CB(alloc_buf,handle->data,1,CB_INT32,suggested_size); assert(jl_is_tuple(ret) && jl_is_pointer(jl_t0(ret)) && jl_is_int32(jl_t1(ret))); buf->base = (char*)jl_unbox_voidpointer(jl_t0(ret)); buf->len = jl_unbox_int32(jl_t1(ret)); } else { buf->len = 0; } }
DLLEXPORT void jl_uv_alloc_buf(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) { if (handle->data) { jl_value_t *ret = JULIA_CB(alloc_buf,handle->data,1,CB_UINT,suggested_size); assert(jl_is_tuple(ret) && jl_is_pointer(jl_t0(ret))); buf->base = (char*)jl_unbox_voidpointer(jl_t0(ret)); #ifdef _P64 assert(jl_is_uint64(jl_t1(ret))); buf->len = jl_unbox_uint64(jl_t1(ret)); #else assert(jl_is_uint32(jl_t1(ret))); buf->len = jl_unbox_uint32(jl_t1(ret)); #endif } else { buf->len = 0; } }