finishing change from 'static' to 'SWIGINTERN'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7001 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ffc93a4bbd
commit
4c873ffb8d
5 changed files with 27 additions and 20 deletions
|
|
@ -20,7 +20,7 @@
|
||||||
An ugly hack, but it works.
|
An ugly hack, but it works.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static PyObject *swig_call_defargs(PyObject *self, PyObject *args) {
|
SWIGINTERN PyObject *swig_call_defargs(PyObject *self, PyObject *args) {
|
||||||
PyObject *func;
|
PyObject *func;
|
||||||
PyObject *parms;
|
PyObject *parms;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,16 +38,16 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
namespace Swig {
|
namespace Swig {
|
||||||
class Director;
|
class Director;
|
||||||
static std::map<void*,Director*>& get_rtdir_map() {
|
SWIGINTERN std::map<void*,Director*>& get_rtdir_map() {
|
||||||
static std::map<void*,Director*> rtdir_map;
|
static std::map<void*,Director*> rtdir_map;
|
||||||
return rtdir_map;
|
return rtdir_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void set_rtdir(void *vptr, Director *rtdir) {
|
SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) {
|
||||||
get_rtdir_map()[vptr] = rtdir;
|
get_rtdir_map()[vptr] = rtdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline Director *get_rtdir(void *vptr) {
|
SWIGINTERNINLINE Director *get_rtdir(void *vptr) {
|
||||||
std::map<void*,Director*>::const_iterator pos = get_rtdir_map().find(vptr);
|
std::map<void*,Director*>::const_iterator pos = get_rtdir_map().find(vptr);
|
||||||
Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0;
|
Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0;
|
||||||
return rtdir;
|
return rtdir;
|
||||||
|
|
|
||||||
|
|
@ -31,13 +31,13 @@ typedef struct swig_varlinkobject {
|
||||||
swig_globalvar *vars;
|
swig_globalvar *vars;
|
||||||
} swig_varlinkobject;
|
} swig_varlinkobject;
|
||||||
|
|
||||||
static PyObject *
|
SWIGINTERN PyObject *
|
||||||
swig_varlink_repr(swig_varlinkobject *v) {
|
swig_varlink_repr(swig_varlinkobject *v) {
|
||||||
v = v;
|
v = v;
|
||||||
return PyString_FromString("<Swig global variables>");
|
return PyString_FromString("<Swig global variables>");
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
SWIGINTERN int
|
||||||
swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
|
swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
|
||||||
swig_globalvar *var;
|
swig_globalvar *var;
|
||||||
flags = flags;
|
flags = flags;
|
||||||
|
|
@ -50,7 +50,7 @@ swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
SWIGINTERN PyObject *
|
||||||
swig_varlink_getattr(swig_varlinkobject *v, char *n) {
|
swig_varlink_getattr(swig_varlinkobject *v, char *n) {
|
||||||
swig_globalvar *var = v->vars;
|
swig_globalvar *var = v->vars;
|
||||||
while (var) {
|
while (var) {
|
||||||
|
|
@ -63,7 +63,7 @@ swig_varlink_getattr(swig_varlinkobject *v, char *n) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
SWIGINTERN int
|
||||||
swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
|
swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
|
||||||
swig_globalvar *var = v->vars;
|
swig_globalvar *var = v->vars;
|
||||||
while (var) {
|
while (var) {
|
||||||
|
|
@ -76,7 +76,7 @@ swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyTypeObject varlinktype = {
|
SWIGINTERN PyTypeObject varlinktype = {
|
||||||
PyObject_HEAD_INIT(0)
|
PyObject_HEAD_INIT(0)
|
||||||
0, /* Number of items in variable part (ob_size) */
|
0, /* Number of items in variable part (ob_size) */
|
||||||
(char *)"swigvarlink", /* Type name (tp_name) */
|
(char *)"swigvarlink", /* Type name (tp_name) */
|
||||||
|
|
@ -119,7 +119,7 @@ static PyTypeObject varlinktype = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Create a variable linking object for use later */
|
/* Create a variable linking object for use later */
|
||||||
static PyObject *
|
SWIGINTERN PyObject *
|
||||||
SWIG_Python_newvarlink(void) {
|
SWIG_Python_newvarlink(void) {
|
||||||
swig_varlinkobject *result = 0;
|
swig_varlinkobject *result = 0;
|
||||||
result = PyMem_NEW(swig_varlinkobject,1);
|
result = PyMem_NEW(swig_varlinkobject,1);
|
||||||
|
|
@ -131,7 +131,7 @@ SWIG_Python_newvarlink(void) {
|
||||||
return ((PyObject*) result);
|
return ((PyObject*) result);
|
||||||
}
|
}
|
||||||
|
|
||||||
static SWIGUNUSED void
|
SWIGINTERN void
|
||||||
SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
||||||
swig_varlinkobject *v;
|
swig_varlinkobject *v;
|
||||||
swig_globalvar *gv;
|
swig_globalvar *gv;
|
||||||
|
|
@ -150,7 +150,7 @@ SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* Install Constants */
|
/* Install Constants */
|
||||||
static void
|
SWIGINTERN void
|
||||||
SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
||||||
PyObject *obj = 0;
|
PyObject *obj = 0;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
@ -191,7 +191,7 @@ SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
||||||
/* Fix SwigMethods to carry the callback ptrs when needed */
|
/* Fix SwigMethods to carry the callback ptrs when needed */
|
||||||
/* -----------------------------------------------------------------------------*/
|
/* -----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
static void
|
SWIGINTERN void
|
||||||
SWIG_Python_FixMethods(PyMethodDef *methods,
|
SWIG_Python_FixMethods(PyMethodDef *methods,
|
||||||
swig_const_info *const_table,
|
swig_const_info *const_table,
|
||||||
swig_type_info **types,
|
swig_type_info **types,
|
||||||
|
|
@ -236,7 +236,7 @@ SWIG_Python_FixMethods(PyMethodDef *methods,
|
||||||
#if PY_MAJOR_VERSION < 2
|
#if PY_MAJOR_VERSION < 2
|
||||||
/* PyModule_AddObject function was introduced in Python 2.0. The following function
|
/* PyModule_AddObject function was introduced in Python 2.0. The following function
|
||||||
is copied out of Python/modsupport.c in python version 2.3.4 */
|
is copied out of Python/modsupport.c in python version 2.3.4 */
|
||||||
static int
|
SWIGINTERN int
|
||||||
PyModule_AddObject(PyObject *m, char *name, PyObject *o)
|
PyModule_AddObject(PyObject *m, char *name, PyObject *o)
|
||||||
{
|
{
|
||||||
PyObject *dict;
|
PyObject *dict;
|
||||||
|
|
|
||||||
|
|
@ -748,7 +748,7 @@ SWIG_Python_GetModule() {
|
||||||
return (swig_module_info *) type_pointer;
|
return (swig_module_info *) type_pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
SWIGINTERN void
|
||||||
SWIG_Python_SetModule(swig_module_info *swig_module) {
|
SWIG_Python_SetModule(swig_module_info *swig_module) {
|
||||||
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
|
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1404,12 +1404,19 @@ public:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Emit the function call */
|
/* Emit the function call */
|
||||||
Printf(f->code, "try {\n");
|
if (directorsEnabled()) {
|
||||||
|
Printf(f->code, "try {\n");
|
||||||
|
}
|
||||||
|
|
||||||
emit_action(n,f);
|
emit_action(n,f);
|
||||||
Printf(f->code, "} catch (Swig::DirectorException& e) {\n");
|
|
||||||
Printf(f->code, " SWIG_Python_AddErrMesg(e.getMessage(), 1);\n");
|
if (directorsEnabled()) {
|
||||||
Printf(f->code, " SWIG_fail;\n");
|
Printf(f->code, "} catch (Swig::DirectorException& e) {\n");
|
||||||
Printf(f->code, "}\n");
|
Printf(f->code, " SWIG_Python_AddErrMesg(e.getMessage(), 1);\n");
|
||||||
|
Printf(f->code, " SWIG_fail;\n");
|
||||||
|
Printf(f->code, "}\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* This part below still needs cleanup */
|
/* This part below still needs cleanup */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue