From 5e8f31b3c81f432a15cd3d415726af06b6748828 Mon Sep 17 00:00:00 2001 From: John Haley Date: Fri, 27 Feb 2015 13:34:01 -0700 Subject: [PATCH 1/2] Fix transfer callback stats This fixes #432. --- generate/templates/partials/callback_helpers.cc | 2 +- generate/templates/partials/field_accessors.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generate/templates/partials/callback_helpers.cc b/generate/templates/partials/callback_helpers.cc index e8209c484..b76f9d0bd 100644 --- a/generate/templates/partials/callback_helpers.cc +++ b/generate/templates/partials/callback_helpers.cc @@ -62,7 +62,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_asyncAfter( {% if arg.isEnum %} NanNew((int)baton->{{ arg.name }}), {% elsif arg.isLibgitType %} - NanNew({{ arg.cppClassName }}::New(&baton->{{ arg.name }}, false)), + NanNew({{ arg.cppClassName }}::New((void *)baton->{{ arg.name }}, false)), {% elsif arg.cType == "size_t" %} // HACK: NAN should really have an overload for NanNew to support size_t NanNew((unsigned int)baton->{{ arg.name }}), diff --git a/generate/templates/partials/field_accessors.cc b/generate/templates/partials/field_accessors.cc index 8b2a543cd..64c0f2623 100644 --- a/generate/templates/partials/field_accessors.cc +++ b/generate/templates/partials/field_accessors.cc @@ -155,7 +155,7 @@ {% if arg.isEnum %} NanNew((int)baton->{{ arg.name }}), {% elsif arg.isLibgitType %} - NanNew({{ arg.cppClassName }}::New(&baton->{{ arg.name }}, false)), + NanNew({{ arg.cppClassName }}::New((void *)baton->{{ arg.name }}, false)), {% elsif arg.cType == "size_t" %} // HACK: NAN should really have an overload for NanNew to support size_t NanNew((unsigned int)baton->{{ arg.name }}), From e92e36091c21370b500de6eed28dbe266cb06bf0 Mon Sep 17 00:00:00 2001 From: John Haley Date: Fri, 27 Feb 2015 13:57:50 -0700 Subject: [PATCH 2/2] Add futurehostile to jshintrc and sort json file --- .jshintrc | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.jshintrc b/.jshintrc index ea2e2b7b1..cbfa16d30 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,26 +1,29 @@ { - "evil": true, "boss": true, - "immed": false, + "curly": true, "eqnull": true, + "evil": true, + "futurehostile": true, + "globals": { + "after": true, + "afterEach": true, + "before": true, + "beforeEach": true, + "define": true, + "describe": true, + "global": true, + "it": true + }, + "immed": false, "maxlen": 80, "node": true, + "predef": [ + "-Promise" + ], "proto": true, - "curly": true, "quotmark": "double", "trailing": true, - "unused": "vars", "undef": true, - "validthis": true, - "globals": { - "global": true, - "define": true, - "it": true, - "describe": true, - "before": true, - "beforeEach": true, - "after": true, - "afterEach": true - }, - "predef": ["-Promise"] + "unused": "vars", + "validthis": true }