scilab: for scilab 6, cannot pass API pointer everywhere in SWIG, use global pointer for now
This commit is contained in:
parent
936c168de1
commit
82fed351dd
2 changed files with 7 additions and 1 deletions
|
|
@ -51,7 +51,12 @@ static void SWIG_Scilab_SetFname(char* _fname) {
|
|||
}
|
||||
fname = strdup(_fname);
|
||||
}
|
||||
|
||||
#if SWIG_SCILAB_VERSION >= 600
|
||||
static void *pvApiCtx = NULL;
|
||||
static void SWIG_Scilab_SetApiContext(void *_pvApiCtx) { pvApiCtx = _pvApiCtx; };
|
||||
#else
|
||||
#define SWIG_Scilab_SetApiContext(void *_pvApiCtx)
|
||||
#endif
|
||||
|
||||
/* Argument management functions */
|
||||
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@ public:
|
|||
Printf(wrapper->code, "SWIG_CheckInputArgument(pvApiCtx, $mininputarguments, $maxinputarguments);\n");
|
||||
Printf(wrapper->code, "SWIG_CheckOutputArgument(pvApiCtx, $minoutputarguments, $maxoutputarguments);\n");
|
||||
Printf(wrapper->code, "SWIG_Scilab_SetFname(fname);\n");
|
||||
Printf(wrapper->code, "SWIG_Scilab_SetApiContext(pvApiCtx);\n");
|
||||
|
||||
for (paramIndex = 0, param = functionParamsList; paramIndex < maxInputArguments; ++paramIndex) {
|
||||
// Ignore parameter if the typemap specifies numinputs=0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue