[Groonga-commit] nroonga/nroonga at 98bd809 [master] Replace Buffer::New with Nan::Buffer

Back to archive index

abetomo null+****@clear*****
Tue Sep 5 11:10:47 JST 2017


abetomo	2017-09-05 11:10:47 +0900 (Tue, 05 Sep 2017)

  New Revision: 98bd809a6ffb53e7dd9d727d1f4335c66c558a15
  https://github.com/nroonga/nroonga/commit/98bd809a6ffb53e7dd9d727d1f4335c66c558a15

  Merged aa61187: Merge pull request #13 from abetomo/use_nan_helper_method

  Message:
    Replace Buffer::New with Nan::Buffer

  Modified files:
    src/nroonga.cc

  Modified: src/nroonga.cc (+2 -2)
===================================================================
--- src/nroonga.cc    2017-09-05 11:09:00 +0900 (262eff9)
+++ src/nroonga.cc    2017-09-05 11:10:47 +0900 (aabcab8)
@@ -126,7 +126,7 @@ void Database::CommandAfter(uv_work_t* req) {
     argv[1] = Nan::Null();
   } else {
     argv[0] = Nan::Null();
-    argv[1] = Buffer::New(isolate, baton->result, baton->result_length)
+    argv[1] = Nan::NewBuffer(baton->result, baton->result_length)
         .ToLocalChecked();
   }
   Local<Function>::New(isolate, baton->callback)
@@ -213,7 +213,7 @@ void Database::CommandSyncString(const FunctionCallbackInfo<Value>& args) {
   }
 
   args.GetReturnValue().Set(
-      Buffer::New(isolate, result, result_length).ToLocalChecked()->ToString());
+      Nan::NewBuffer(result, result_length).ToLocalChecked()->ToString());
 }
 
 void InitNroonga(Handle<Object> target) {
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index