Fix Unresolved external symbol "FromConstructorTemplate..." linking on Windows, per #108
This commit is contained in:
parent
1b69051708
commit
5b7bfe0ed4
24
src/eckey.cc
24
src/eckey.cc
@ -160,20 +160,26 @@ Key::New()
|
|||||||
Handle<Value>
|
Handle<Value>
|
||||||
Key::New(const Arguments& args)
|
Key::New(const Arguments& args)
|
||||||
{
|
{
|
||||||
if (!args.IsConstructCall()) {
|
|
||||||
return FromConstructorTemplate(s_ct, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
HandleScope scope;
|
HandleScope scope;
|
||||||
|
|
||||||
Key* key = new Key();
|
// this was invoked as Key() not new Key()
|
||||||
if (key->lastError != NULL) {
|
if (!args.IsConstructCall()) {
|
||||||
return VException(key->lastError);
|
// return FromConstructorTemplate(s_ct, args);
|
||||||
|
|
||||||
|
const int argc = 1;
|
||||||
|
Local<Value> argv[argc] = { args[0] };
|
||||||
|
return scope.Close(s_ct->GetFunction()->NewInstance(argc, argv));
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
Key* key = new Key();
|
||||||
|
if (key->lastError != NULL) {
|
||||||
|
return VException(key->lastError);
|
||||||
|
}
|
||||||
|
|
||||||
key->Wrap(args.Holder());
|
key->Wrap(args.Holder());
|
||||||
|
|
||||||
return scope.Close(args.This());
|
return scope.Close(args.This());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle<Value>
|
Handle<Value>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user