Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

optimization for node 0.10

  • Loading branch information...
commit c2ffa292e42da32f6d6fdcd4aa7495cc0e4e553b 1 parent 41113d1
@mscdex authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/magic.cc
View
4 src/magic.cc
@@ -154,7 +154,11 @@ class Magic : public ObjectWrap {
}
Local<Function> callback = Local<Function>::Cast(args[1]);
+#if NODE_MAJOR_VERSION == 0 && NODE_MINOR_VERSION < 10
Local<Object> buffer_obj = args[0]->ToObject();
+#else
+ Local<Value> buffer_obj = args[0];
+#endif
Baton* baton = new Baton();
baton->error = false;
Please sign in to comment.
Something went wrong with that request. Please try again.