[Javascript] Fix handling of functions which take void*

Fixes #682
This commit is contained in:
Olly Betts 2022-03-07 13:24:37 +13:00 committed by Olly Betts
commit 8dbcd710ff
5 changed files with 36 additions and 2 deletions

View file

@ -122,7 +122,7 @@ SWIGRUNTIME int SWIG_JSC_ConvertInstancePtr(JSContextRef context, JSObjectRef ob
}
assert(ptr);
*ptr = NULL;
if (cdata->info == info) {
if (!info || cdata->info == info) {
*ptr = cdata->swigCObject;
} else {
swig_cast_info *tc = SWIG_TypeCheckStruct(cdata->info, info);