Skip to content

Instantly share code, notes, and snippets.

@yawnt

yawnt/addon.c++ Secret

Created December 19, 2012 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yawnt/28b56bf1a7b1aa2f3a26 to your computer and use it in GitHub Desktop.
Save yawnt/28b56bf1a7b1aa2f3a26 to your computer and use it in GitHub Desktop.
void after_mssget_async(uv_work_t *req) {
struct write_req *orig = (struct write_req *) req->data;
Handle<Value> err = (orig->value < 0) ? Exception::Error(String::New(orig->error)) : Null();
Handle<Value> argv[] = { err, Number::New((int) orig->value) };
orig->cbl->Call(Context::GetCurrent()->Global(), 2, argv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment