for clarity and for easier maintainance. pyrun.swg almost the same than 1.3.20, therefore there will be compatible again. code generated is reduced by the use and reuse of %fragments. as usual, all the test-suite is compiling and a much bigger "test project" too. with the new typemaps definition should be much eaiser and uniform add stl/std and user types. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5706 626c5289-ae23-0410-ae9c-e8d60b6d4f22
17 lines
614 B
Text
17 lines
614 B
Text
/* ------------------------------------------------------------
|
|
* PyObject * - Just pass straight through unmodified
|
|
* ------------------------------------------------------------ */
|
|
|
|
%typemap(in) PyObject * "$1 = $input;";
|
|
%typemap(out) PyObject * "$result = $1;";
|
|
|
|
%typemap(constcode) PyObject * "PyDict_SetItemString(d,\"$symname\", $value);";
|
|
|
|
%typemap(directorin, parse="O") PyObject * "";
|
|
%typemap(directorout) PyObject * "$result = $input;";
|
|
|
|
%typecheck(SWIG_TYPECHECK_POINTER) PyObject * "$1 = ($input != 0);";
|
|
|
|
%typemap(throws) PyObject *
|
|
"PyErr_SetObject(PyExc_RuntimeError, $1);
|
|
SWIG_fail;";
|