scilab: fix default_args test (crash on casts1)
This commit is contained in:
parent
a00354f2e3
commit
a33d81fd6b
1 changed files with 18 additions and 10 deletions
|
|
@ -155,6 +155,7 @@ SWIG_SciString_AsCharPtrAndSize(void *_pvApiCtx, int _iVar, char **_pcValue, siz
|
||||||
%fragment("SWIG_SciString_FromCharPtr", "header") {
|
%fragment("SWIG_SciString_FromCharPtr", "header") {
|
||||||
SWIGINTERN int
|
SWIGINTERN int
|
||||||
SWIG_SciString_FromCharPtr(void *_pvApiCtx, int _iVarOut, const char *_pchValue) {
|
SWIG_SciString_FromCharPtr(void *_pvApiCtx, int _iVarOut, const char *_pchValue) {
|
||||||
|
if (_pchValue) {
|
||||||
SciErr sciErr;
|
SciErr sciErr;
|
||||||
char **pstData = NULL;
|
char **pstData = NULL;
|
||||||
|
|
||||||
|
|
@ -168,6 +169,13 @@ SWIG_SciString_FromCharPtr(void *_pvApiCtx, int _iVarOut, const char *_pchValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
free(pstData[0]);
|
free(pstData[0]);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int iRet = createEmptyMatrix(_pvApiCtx, SWIG_NbInputArgument(_pvApiCtx) + _iVarOut);
|
||||||
|
if (iRet) {
|
||||||
|
return SWIG_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue