use SWIGINTERN instead of static

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7728 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-10-26 07:11:43 +00:00
commit 4ba7c0ac1b

View file

@ -1199,24 +1199,24 @@ public:
if (!varargs) { if (!varargs) {
if (CPlusPlus) { if (CPlusPlus) {
Printv(f->def, Printv(f->def,
"static PyObject *", wname, "SWIGINTERN PyObject *", wname,
"(PyObject *, PyObject *args) {", "(PyObject *, PyObject *args) {",
NIL); NIL);
} else { } else {
Printv(f->def, Printv(f->def,
"static PyObject *", wname, "SWIGINTERN PyObject *", wname,
"(PyObject *self, PyObject *args) {", "(PyObject *self, PyObject *args) {",
NIL); NIL);
} }
} else { } else {
if (CPlusPlus) { if (CPlusPlus) {
Printv(f->def, Printv(f->def,
"static PyObject *", wname, "__varargs__", "SWIGINTERN PyObject *", wname, "__varargs__",
"(PyObject *, PyObject *args, PyObject *varargs) {", "(PyObject *, PyObject *args, PyObject *varargs) {",
NIL); NIL);
} else { } else {
Printv(f->def, Printv(f->def,
"static PyObject *", wname, "__varargs__", "SWIGINTERN PyObject *", wname, "__varargs__",
"(PyObject *self, PyObject *args, PyObject *varargs) {", "(PyObject *self, PyObject *args, PyObject *varargs) {",
NIL); NIL);
} }
@ -1234,12 +1234,12 @@ public:
} }
if (CPlusPlus) { if (CPlusPlus) {
Printv(f->def, Printv(f->def,
"static PyObject *", wname, "SWIGINTERN PyObject *", wname,
"(PyObject *, PyObject *args, PyObject *kwargs) {", "(PyObject *, PyObject *args, PyObject *kwargs) {",
NIL); NIL);
} else { } else {
Printv(f->def, Printv(f->def,
"static PyObject *", wname, "SWIGINTERN PyObject *", wname,
"(PyObject *self, PyObject *args, PyObject *kwargs) {", "(PyObject *self, PyObject *args, PyObject *kwargs) {",
NIL); NIL);
} }
@ -1547,7 +1547,7 @@ public:
DelWrapper(f); DelWrapper(f);
f = NewWrapper(); f = NewWrapper();
Printv(f->def, Printv(f->def,
"static PyObject *", wname, "SWIGINTERN PyObject *", wname,
"(PyObject *self, PyObject *args) {", "(PyObject *self, PyObject *args) {",
NIL); NIL);
Wrapper_add_local(f,"resultobj", "PyObject *resultobj"); Wrapper_add_local(f,"resultobj", "PyObject *resultobj");
@ -1634,7 +1634,7 @@ public:
/* Create a function for setting the value of the variable */ /* Create a function for setting the value of the variable */
if (assignable) { if (assignable) {
Printf(setf->def,"static int %s(PyObject *_val) {", setnamef); Printf(setf->def,"SWIGINTERN int %s(PyObject *_val) {", setnamef);
if ((tm = Swig_typemap_lookup_new("varin",n,name,0))) { if ((tm = Swig_typemap_lookup_new("varin",n,name,0))) {
Replaceall(tm,"$source","_val"); Replaceall(tm,"$source","_val");
Replaceall(tm,"$target",name); Replaceall(tm,"$target",name);
@ -1651,9 +1651,9 @@ public:
} else { } else {
/* Is a readonly variable. Issue an error */ /* Is a readonly variable. Issue an error */
if (CPlusPlus) { if (CPlusPlus) {
Printf(setf->def,"static int %s(PyObject *) {", setnamef); Printf(setf->def,"SWIGINTERN int %s(PyObject *) {", setnamef);
} else { } else {
Printf(setf->def,"static int %s(PyObject *_val SWIGUNUSED) {", setnamef); Printf(setf->def,"SWIGINTERN int %s(PyObject *_val SWIGUNUSED) {", setnamef);
} }
Printv(setf->code, Printv(setf->code,
tab4, "SWIG_Error(SWIG_AttributeError,\"Variable ", iname," is read-only.\");\n", tab4, "SWIG_Error(SWIG_AttributeError,\"Variable ", iname," is read-only.\");\n",
@ -1665,7 +1665,7 @@ public:
Wrapper_print(setf,f_wrappers); Wrapper_print(setf,f_wrappers);
/* Create a function for getting the value of a variable */ /* Create a function for getting the value of a variable */
Printf(getf->def,"static PyObject *%s(void) {", getnamef); Printf(getf->def,"SWIGINTERN PyObject *%s(void) {", getnamef);
Wrapper_add_local(getf,"pyobj", "PyObject *pyobj = 0"); Wrapper_add_local(getf,"pyobj", "PyObject *pyobj = 0");
if ((tm = Swig_typemap_lookup_new("varout",n,name,0))) { if ((tm = Swig_typemap_lookup_new("varout",n,name,0))) {
Replaceall(tm,"$source",name); Replaceall(tm,"$source",name);
@ -2084,7 +2084,7 @@ public:
SwigType_remember(ct); SwigType_remember(ct);
if (CPlusPlus) { if (CPlusPlus) {
Printv(f_wrappers, Printv(f_wrappers,
"static PyObject * ", class_name, "_swigregister(PyObject *, PyObject *args) {\n", "SWIGINTERN PyObject * ", class_name, "_swigregister(PyObject *, PyObject *args) {\n",
tab4, "PyObject *obj;\n", tab4, "PyObject *obj;\n",
tab4, "if (!PyArg_ParseTuple(args,(char*)\"O\", &obj)) return NULL;\n", tab4, "if (!PyArg_ParseTuple(args,(char*)\"O\", &obj)) return NULL;\n",
tab4, "SWIG_TypeClientData(SWIGTYPE", SwigType_manglestr(ct),", obj);\n", tab4, "SWIG_TypeClientData(SWIGTYPE", SwigType_manglestr(ct),", obj);\n",
@ -2093,7 +2093,7 @@ public:
"}\n",NIL); "}\n",NIL);
} else { } else {
Printv(f_wrappers, Printv(f_wrappers,
"static PyObject * ", class_name, "_swigregister(PyObject *self, PyObject *args) {\n", "SWIGINTERN PyObject * ", class_name, "_swigregister(PyObject *self SWIGUNUSED, PyObject *args) {\n",
tab4, "PyObject *obj;\n", tab4, "PyObject *obj;\n",
tab4, "if (!PyArg_ParseTuple(args,(char*)\"O\", &obj)) return NULL;\n", tab4, "if (!PyArg_ParseTuple(args,(char*)\"O\", &obj)) return NULL;\n",
tab4, "SWIG_TypeClientData(SWIGTYPE", SwigType_manglestr(ct),", obj);\n", tab4, "SWIG_TypeClientData(SWIGTYPE", SwigType_manglestr(ct),", obj);\n",