New test for strings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@12579 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f209d5a409
commit
dca46d044f
4 changed files with 57 additions and 6 deletions
|
|
@ -45,12 +45,16 @@ SWIG_Scilab_ConvertPtr(StrCtx* pvApiCtx, int obj, void **ptr, swig_type_info* de
|
|||
}
|
||||
|
||||
sciErr = getVarType(pvApiCtx, piAddrVar, &iType);
|
||||
if (sciErr.iErr || iType != sci_pointer)
|
||||
if (sciErr.iErr)
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: Pointer expected.\n"), "SWIG_Scilab_ConvertPtr", obj);
|
||||
printError(&sciErr, 0);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
if (iType != sci_pointer)
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: Pointer expected.\n"), "SWIG_Scilab_ConvertPtr", obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
sciErr = getPointer(pvApiCtx, piAddrVar, ptr);
|
||||
if (sciErr.iErr)
|
||||
|
|
|
|||
|
|
@ -675,7 +675,7 @@
|
|||
iVarOut++;
|
||||
}
|
||||
|
||||
%typemap(out) char * (int iRowsOut, int iColsOut) {
|
||||
/*%typemap(out) char * (int iRowsOut, int iColsOut) {
|
||||
iRowsOut = 1;
|
||||
iColsOut = 1;
|
||||
|
||||
|
|
@ -689,7 +689,7 @@
|
|||
LhsVar(iOutNum) = iVarOut;
|
||||
iOutNum++;
|
||||
iVarOut++;
|
||||
}
|
||||
}*/
|
||||
|
||||
%typemap(out) enum SWIGTYPE (int iRowsOut, int iColsOut) {
|
||||
iRowsOut = 1;
|
||||
|
|
@ -1421,7 +1421,7 @@
|
|||
iVarOut++;
|
||||
}
|
||||
%typemap(varout,noblock=1) signed char [ANY] { SCILAB_VAROUT(char, createMatrixOfInteger8, 1, $1_dim0) }
|
||||
%typemap(varout,noblock=1) unsigned char [ANY] { SCILAB_VAROUT(unsigned char, createMatrixOfUnsignedInteger8, 1, $1_dim0) }
|
||||
//%typemap(varout,noblock=1) unsigned char [ANY] { SCILAB_VAROUT(unsigned char, createMatrixOfUnsignedInteger8, 1, $1_dim0) }
|
||||
%typemap(varout,noblock=1) short [ANY] { SCILAB_VAROUT(short, createMatrixOfInteger16, 1, $1_dim0) }
|
||||
%typemap(varout,noblock=1) unsigned short [ANY] { SCILAB_VAROUT(unsigned short, createMatrixOfUnsignedInteger16, 1, $1_dim0) }
|
||||
//%typemap(varout,noblock=1) int [ANY], long [ANY] { SCILAB_VAROUT(int, createMatrixOfInteger32, 1, $1_dim0) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue