1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

s/RecvCallback/deno_recv_cb/g

This commit is contained in:
Ryan Dahl 2018-06-11 16:48:21 +02:00
parent 041e503838
commit 2791a49ecf
3 changed files with 6 additions and 8 deletions

View file

@ -8,14 +8,13 @@
#include "v8/include/v8.h"
extern "C" {
// deno_s = Wrapped Isolate.
struct deno_s {
v8::Isolate* isolate;
std::string last_exception;
v8::Persistent<v8::Function> recv;
v8::Persistent<v8::Context> context;
RecvCallback cb;
deno_recv_cb cb;
void* data;
};
}
@ -29,7 +28,7 @@ static intptr_t external_references[] = {reinterpret_cast<intptr_t>(Print),
reinterpret_cast<intptr_t>(Recv),
reinterpret_cast<intptr_t>(Send), 0};
Deno* NewFromSnapshot(void* data, RecvCallback cb);
Deno* NewFromSnapshot(void* data, deno_recv_cb cb);
v8::StartupData MakeSnapshot(v8::StartupData* prev_natives_blob,
v8::StartupData* prev_snapshot_blob,

View file

@ -16,7 +16,7 @@ namespace deno {
#include "natives_deno.cc"
#include "snapshot_deno.cc"
Deno* NewFromSnapshot(void* data, RecvCallback cb) {
Deno* NewFromSnapshot(void* data, deno_recv_cb cb) {
auto natives_blob = *StartupBlob_natives();
auto snapshot_blob = *StartupBlob_snapshot();
@ -46,8 +46,7 @@ Deno* NewFromSnapshot(void* data, RecvCallback cb) {
} // namespace deno
extern "C" {
Deno* deno_new(void* data, RecvCallback cb) {
Deno* deno_new(void* data, deno_recv_cb cb) {
return deno::NewFromSnapshot(data, cb);
}
}

View file

@ -18,14 +18,14 @@ struct deno_s;
typedef struct deno_s Deno;
// The callback from V8 when data is sent.
typedef deno_buf (*RecvCallback)(Deno* d, deno_buf buf);
typedef deno_buf (*deno_recv_cb)(Deno* d, deno_buf buf);
void deno_init();
const char* deno_v8_version();
void deno_set_flags(int* argc, char** argv);
// Constructor
Deno* deno_new(void* data, RecvCallback cb);
Deno* deno_new(void* data, deno_recv_cb cb);
// Returns nonzero on error.
// Get error text with deno_last_exception().