fixed return values and added missing newer v8 dtor wrapper.
This commit is contained in:
parent
0e78fc0ad7
commit
b7db2a84c9
1 changed files with 15 additions and 6 deletions
|
|
@ -18,8 +18,8 @@ typedef v8::AccessorInfo SwigV8PropertyCallbackInfo;
|
||||||
typedef void SwigV8ReturnValue;
|
typedef void SwigV8ReturnValue;
|
||||||
typedef v8::FunctionCallbackInfo<v8::Value> SwigV8Arguments;
|
typedef v8::FunctionCallbackInfo<v8::Value> SwigV8Arguments;
|
||||||
typedef v8::PropertyCallbackInfo<v8::Value> SwigV8PropertyCallbackInfo;
|
typedef v8::PropertyCallbackInfo<v8::Value> SwigV8PropertyCallbackInfo;
|
||||||
#define SWIGV8_RETURN(val) return args.GetReturnValue().Set(val)
|
#define SWIGV8_RETURN(val) args.GetReturnValue().Set(val); return
|
||||||
#define SWIGV8_RETURN_INFO(val, info) return args.GetReturnValue().Set(val)
|
#define SWIGV8_RETURN_INFO(val, info) info.GetReturnValue().Set(val); return
|
||||||
#endif
|
#endif
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
@ -171,16 +171,25 @@ void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object > * object, SWI
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
%fragment ("js_dtoroverride", "templates")
|
%fragment ("js_dtoroverride", "templates")
|
||||||
%{
|
%{
|
||||||
void $jswrapper(v8::Persistent< v8::Value > object, void *parameter) {
|
#if (SWIG_V8_VERSION < 0x031900)
|
||||||
SWIGV8_Proxy* proxy = (SWIGV8_Proxy*) parameter;
|
void $jswrapper(v8::Persistent< v8::Value > object, void *parameter)
|
||||||
|
{
|
||||||
|
SWIGV8_Proxy *proxy = static_cast<SWIGV8_Proxy *>(parameter);
|
||||||
|
#else
|
||||||
|
void $jswrapper(v8::Isolate *isolate, v8::Persistent< v8::Object > * object, SWIGV8_Proxy *proxy)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
if(proxy->swigCMemOwn && proxy->swigCObject) {
|
if(proxy->swigCMemOwn && proxy->swigCObject) {
|
||||||
$jstype arg1 = ($jstype)proxy->swigCObject;
|
$jstype arg1 = ($jstype)proxy->swigCObject;
|
||||||
${destructor_action}
|
${destructor_action}
|
||||||
}
|
}
|
||||||
delete proxy;
|
delete proxy;
|
||||||
|
|
||||||
object.Clear();
|
#if (SWIG_V8_VERSION < 0x031900)
|
||||||
object.Dispose();
|
object.Dispose();
|
||||||
|
#else
|
||||||
|
object->Dispose(isolate);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
@ -214,7 +223,7 @@ fail:
|
||||||
%fragment("js_setter", "templates")
|
%fragment("js_setter", "templates")
|
||||||
%{
|
%{
|
||||||
void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
|
void $jswrapper(v8::Local<v8::String> property, v8::Local<v8::Value> value,
|
||||||
const SwigV8PropertyCallbackInfo& info) {
|
const SwigV8PropertyCallbackInfoVoid& info) {
|
||||||
v8::HandleScope scope;
|
v8::HandleScope scope;
|
||||||
$jslocals
|
$jslocals
|
||||||
$jscode
|
$jscode
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue