diff --git a/src/Canvas.cc b/src/Canvas.cc index c14731d..869bbd8 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -211,7 +211,7 @@ Canvas::EIO_AfterToBuffer(eio_req *req) { } else { Local buf = NanNewBufferHandle((char*)closure->data, closure->len); memcpy(Buffer::Data(buf), closure->data, closure->len); - Local argv[2] = { NanNull(), buf }; + Local argv[2] = { NanNew(NanNull()), buf }; closure->pfn->Call(2, argv); } @@ -348,7 +348,7 @@ streamPNG(void *c, const uint8_t *data, unsigned len) { closure_t *closure = (closure_t *) c; Local buf = NanNewBufferHandle((char *)data, len); Local argv[3] = { - NanNull() + NanNew(NanNull()) , buf , NanNew(len) }; NanMakeCallback(NanGetCurrentContext()->Global(), closure->fn, 3, argv); @@ -423,8 +423,8 @@ NAN_METHOD(Canvas::StreamPNGSync) { NanMakeCallback(NanGetCurrentContext()->Global(), closure.fn, 1, argv); } else { Local argv[3] = { - NanNull() - , NanNull() + NanNew(NanNull()) + , NanNew(NanNull()) , NanNew(0) }; NanMakeCallback(NanGetCurrentContext()->Global(), closure.fn, 1, argv); } diff --git a/src/JPEGStream.h b/src/JPEGStream.h index 0f5b5a4..5d06a86 100644 --- a/src/JPEGStream.h +++ b/src/JPEGStream.h @@ -34,7 +34,7 @@ empty_closure_output_buffer(j_compress_ptr cinfo){ closure_destination_mgr *dest = (closure_destination_mgr *) cinfo->dest; Local buf = NanNewBufferHandle((char *)dest->buffer, dest->bufsize); Local argv[3] = { - NanNull() + NanNew(NanNull()) , NanNew(buf) , NanNew(dest->bufsize) };