mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 20:59:10 +00:00
Clarify memory guarantees of deno_buf
This commit is contained in:
parent
7242f2b5a5
commit
e89a49490c
3 changed files with 17 additions and 21 deletions
|
|
@ -10,14 +10,16 @@ extern "C" {
|
|||
|
||||
// Data that gets transmitted.
|
||||
typedef struct {
|
||||
void* data;
|
||||
const char* data;
|
||||
size_t len;
|
||||
} deno_buf;
|
||||
|
||||
struct deno_s;
|
||||
typedef struct deno_s Deno;
|
||||
|
||||
// The callback from V8 when data is sent.
|
||||
// A callback to receive a message from deno_pub javascript call.
|
||||
// buf is valid only for the lifetime of the call.
|
||||
// The returned deno_buf is returned from deno_pub in javascript.
|
||||
typedef deno_buf (*deno_sub_cb)(Deno* d, const char* channel, deno_buf buf);
|
||||
|
||||
void deno_init();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue