Browse Source

io.js compatibility

v1.x
zahranisa 10 years ago
parent
commit
66fa59c4a8
  1. 2
      package.json
  2. 2
      src/Canvas.cc
  3. 2
      src/JPEGStream.h

2
package.json

@ -24,7 +24,7 @@
"test": "make test"
},
"dependencies": {
"nan": "~1.2.0"
"nan": "~1.5.1"
},
"devDependencies": {
"express": "3.0",

2
src/Canvas.cc

@ -353,7 +353,7 @@ streamPNG(void *c, const uint8_t *data, unsigned len) {
Local<Value> argv[3] = {
NanNew(NanNull())
, buf
, NanNew<Integer>(len) };
, NanNew<Number>(len) };
NanMakeCallback(NanGetCurrentContext()->Global(), closure->fn, 3, argv);
return CAIRO_STATUS_SUCCESS;
}

2
src/JPEGStream.h

@ -54,7 +54,7 @@ term_closure_destination(j_compress_ptr cinfo){
Local<Value> data_argv[3] = {
NanNew(NanNull())
, NanNew(buf)
, NanNew<Integer>(remaining)
, NanNew<Number>(remaining)
};
NanMakeCallback(NanGetCurrentContext()->Global(), dest->closure->fn, 3, data_argv);

Loading…
Cancel
Save