add matrix.i

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@11893 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Baozeng Ding 2010-03-03 11:39:17 +00:00
commit 613d1a1a8d
3 changed files with 17 additions and 13 deletions

View file

@ -1,17 +1,6 @@
%module matrixlib
%typemap (in,noblock=1) (double *first, int nbRow, int nbCol){
int *piAddr = NULL;
sciErr = getVarAddressFromPosition(pvApiCtx, 1, &piAddr);
if (sciErr.iErr) {
printError(&sciErr, 0);
return 0;
}
sciErr = getMatrixOfDouble(pvApiCtx, piAddr, &$2, &$3, &$1);
if (sciErr.iErr) {
printError(&sciErr, 0);
return 0;
}
}
%include "matrix.i"
extern double sumitems(double *, int, int);
%typemap (in) (int *numberOfRow, int *numberOfCol) {
$1 = &iRowsOut;
$2 = &iColsOut;