Javascript type conversion support

Add testcase for previous commit.
Add missing assert for future type conversions support that will use
the heap instead of pointer casts (for smart pointer type conversions).

Closes #1963
This commit is contained in:
William S Fulton 2021-03-11 08:10:00 +00:00
commit 04b46cc8a3
4 changed files with 19 additions and 0 deletions

View file

@ -291,6 +291,7 @@ SWIGRUNTIME int SWIG_V8_ConvertInstancePtr(SWIGV8_OBJECT objRef, void **ptr, swi
}
int newmemory = 0;
*ptr = SWIG_TypeCast(tc, cdata->swigCObject, &newmemory);
assert(!newmemory); /* newmemory handling not yet implemented */
} else {
*ptr = cdata->swigCObject;
}

View file

@ -64,6 +64,7 @@
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <assert.h>
%}
%insert(runtime) "swigrun.swg"; /* SWIG API */