Skip to content

Commit

Permalink
Work around compiler bug regarding ambiguous overload
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoopa committed Apr 27, 2016
1 parent a90951e commit bbf82b0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion nan.h
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,18 @@ NAN_INLINE void SetMethod(
}

NAN_INLINE void SetMethod(
v8::Local<v8::Template> templ
v8::Local<v8::FunctionTemplate> templ
, const char *name
, FunctionCallback callback) {
HandleScope scope;
v8::Local<v8::FunctionTemplate> t = New<v8::FunctionTemplate>(callback);
v8::Local<v8::String> fn_name = New(name).ToLocalChecked();
t->SetClassName(fn_name);
templ->Set(fn_name, t);
}

NAN_INLINE void SetMethod(
v8::Local<v8::ObjectTemplate> templ
, const char *name
, FunctionCallback callback) {
HandleScope scope;
Expand Down

0 comments on commit bbf82b0

Please sign in to comment.