cleaning + comments, and add the nondynamic feature handlers

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6266 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-09-26 01:00:28 +00:00
commit 3d5d0f535a
6 changed files with 132 additions and 64 deletions

View file

@ -4,41 +4,30 @@
* Python configuration module.
* ----------------------------------------------------------------------------- */
/* Python.h has to appear first */
/* -----------------------------------------------------------------------------
* The runtime part
* ----------------------------------------------------------------------------- */
%include <pyruntime.swg>
%insert(runtime) %{
#include <Python.h>
%}
%insert(runtime) "precommon.swg";
%insert(runtime) "common.swg"; /* Common type-checking code */
%insert(runtime) "pyrun.swg"; /* Python run-time code */
/* Special directive for shadow code */
#define %shadow %insert("shadow")
#define %pythoncode %insert("python")
/* -----------------------------------------------------------------------------
* Special user directives
* ----------------------------------------------------------------------------- */
%include <pyuserdir.swg>
/* -----------------------------------------------------------------------------
* Inner macros (ugly ones)
* ----------------------------------------------------------------------------- */
%include <pymacros.swg>
/* -----------------------------------------------------------------------------
* Look for user fragments file. If not found, include empty system one.
* ----------------------------------------------------------------------------- */
%include "pyfragments.swg"
/* -----------------------------------------------------------------------------
* SWIGTYPE typemaps
* ----------------------------------------------------------------------------- */
%include <pyswigtype.swg>
/* -----------------------------------------------------------------------------
* Typemap specializations
* ----------------------------------------------------------------------------- */
%include <pyswigtype.swg>
%include <pyinout.swg>
%include <pyvoid.swg>
%include <pyobject.swg>
@ -61,28 +50,6 @@
%include <pythonkw.swg>
/* ------------------------------------------------------------
* The start of the Python initialization function
* The Python initialization function
* ------------------------------------------------------------ */
%init %{
#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT(void) SWIG_init(void) {
static PyObject *SWIG_globals = 0;
static int typeinit = 0;
PyObject *m, *d;
int i;
if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
m = Py_InitModule((char *) SWIG_name, SwigMethods);
d = PyModule_GetDict(m);
if (!typeinit) {
for (i = 0; swig_types_initial[i]; i++) {
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
}
typeinit = 1;
}
SWIG_InstallConstants(d,swig_const_table);
%}
%include <pyinit.swg>