fix some small thing

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11977 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Baozeng Ding 2010-04-04 02:20:29 +00:00
commit 38f4edcdac
3 changed files with 11 additions and 6 deletions

View file

@ -7,3 +7,4 @@ sumitems(myMatrix)
myOtherMatrix=getValues(1);
size(myOtherMatrix)
disp(myOtherMatrix);
exit

View file

@ -969,7 +969,7 @@
}
sciErr = getVarType(pvApiCtx, piAddrVar, &iType);
if (sciErr.iErr || iType != sci_pointer {
if (sciErr.iErr || iType != sci_pointer) {
Scierror(999, _("%s: Wrong type for input argument #%d: Pointer expected.\n"), fname, $argnum);
printError(&sciErr, 0);
return 0;
@ -1847,7 +1847,7 @@
}
%typemap(varin,noblock=1) enum SWIGTYPE {
int iType;
int iPrec;
int *_piData;
sciErr = getVarAddressFromPosition(pvApiCtx, $argnum, &piAddrVar);
if (sciErr.iErr) {
@ -2330,7 +2330,7 @@
/* Enums */
%typemap(varout,noblock=1) enum SWIGTYPE {
sciErr = createMatrixOfInteger32(pvApiCtx, iVarOut, iRowsOut, iColsOut, (int *)&temp);
sciErr = createMatrixOfInteger32(pvApiCtx, iVarOut, iRowsOut, iColsOut, (int *)&$result);
if (sciErr.iErr) {
printError(&sciErr, 0);
return 0;

View file

@ -254,8 +254,10 @@ public:
Replaceall(tm, "$result", "result");
/* There are more than one output */
if (out_required > 0)
if (out_required > 0) {
Printf(f->code, "LhsVar(iOutNum) = iVarOut;\n");
Printf(f->code, "iOutNum ++;\niVarOut ++;\n");
}
Printf(f->code, "%s\n", tm);
if (strlen(Char(tm)) != 0)
out_required ++;
@ -268,8 +270,10 @@ public:
String *outarg = NewString("");
for (p = l; p;) {
if ((tm = Getattr(p, "tmap:argout"))) {
if (out_required > 0)
Printf(f->code,"iOutNum ++;\niVarOut ++;\n");
if (out_required > 0) {
Printf(f->code, "LhsVar(iOutNum) = iVarOut;\n");
Printf(f->code,"iOutNum ++;\niVarOut ++;\n");
}
Printv(outarg, tm, "\n", NIL);
p = Getattr(p, "tmap:argout:next");
out_required ++;