Reducing pyrun.swg and splitting python.swg into different files
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@5706 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
15923cd8b8
commit
c9d6e27b5c
17 changed files with 1465 additions and 1250 deletions
17
SWIG/Lib/python/pyobject.swg
Normal file
17
SWIG/Lib/python/pyobject.swg
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* ------------------------------------------------------------
|
||||
* 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;";
|
||||
Loading…
Add table
Add a link
Reference in a new issue