Overloading for non-pointers and NULL - Javascript

Overloading support for Javascript is generally incomplete as there are
no typecheck typemaps, so the overloading and NULL support added here
doesn't work and won't work until the typecheck typemaps are
implemented.
This commit is contained in:
William S Fulton 2018-12-30 10:11:35 +00:00
commit ec8d978995
3 changed files with 51 additions and 2 deletions

View file

@ -150,7 +150,7 @@ SWIGRUNTIME int SWIG_JSC_ConvertPtr(JSContextRef context, JSValueRef valRef, voi
/* special case: JavaScript null => C NULL pointer */
if(JSValueIsNull(context, valRef)) {
*ptr=0;
return SWIG_OK;
return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
}
if(!JSValueIsObject(context, valRef)) {

View file

@ -347,7 +347,7 @@ SWIGRUNTIME int SWIG_V8_ConvertPtr(v8::Handle<v8::Value> valRef, void **ptr, swi
/* special case: JavaScript null => C NULL pointer */
if(valRef->IsNull()) {
*ptr=0;
return SWIG_OK;
return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
}
if(!valRef->IsObject()) {
return SWIG_TypeError;