Add Javascript support for std::unique_ptr and std::auto_ptr
Equivalent to Ruby/Python implementations.
This commit is contained in:
parent
7556ed0889
commit
fe17296eb4
11 changed files with 358 additions and 6 deletions
|
|
@ -194,8 +194,15 @@ SWIGRUNTIME int SWIG_V8_ConvertInstancePtr(SWIGV8_OBJECT objRef, void **ptr, swi
|
|||
*ptr = cdata->swigCObject;
|
||||
}
|
||||
|
||||
if(flags & SWIG_POINTER_DISOWN) {
|
||||
cdata->swigCMemOwn = false;
|
||||
if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !cdata->swigCMemOwn) {
|
||||
return SWIG_ERROR_RELEASE_NOT_OWNED;
|
||||
} else {
|
||||
if (flags & SWIG_POINTER_DISOWN) {
|
||||
cdata->swigCMemOwn = false;
|
||||
}
|
||||
if (flags & SWIG_POINTER_CLEAR) {
|
||||
cdata->swigCObject = 0;
|
||||
}
|
||||
}
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue