more warning fixes, cosmetics, and uniformity changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7006 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4497f06c12
commit
e38ce2b2c3
5 changed files with 106 additions and 89 deletions
|
|
@ -121,27 +121,28 @@ SWIGINTERN PyTypeObject varlinktype = {
|
|||
/* Create a variable linking object for use later */
|
||||
SWIGINTERN PyObject *
|
||||
SWIG_Python_newvarlink(void) {
|
||||
swig_varlinkobject *result = 0;
|
||||
result = PyMem_NEW(swig_varlinkobject,1);
|
||||
varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */
|
||||
result->ob_type = &varlinktype;
|
||||
result->vars = 0;
|
||||
result->ob_refcnt = 0;
|
||||
Py_XINCREF((PyObject *) result);
|
||||
swig_varlinkobject *result = PyMem_NEW(swig_varlinkobject,1);
|
||||
if (result) {
|
||||
varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */
|
||||
result->ob_type = &varlinktype;
|
||||
result->vars = 0;
|
||||
result->ob_refcnt = 0;
|
||||
Py_INCREF((PyObject *) result);
|
||||
}
|
||||
return ((PyObject*) result);
|
||||
}
|
||||
|
||||
SWIGINTERN void
|
||||
SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
||||
swig_varlinkobject *v;
|
||||
swig_globalvar *gv;
|
||||
v= (swig_varlinkobject *) p;
|
||||
gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
|
||||
gv->name = (char *) malloc(strlen(name)+1);
|
||||
strcpy(gv->name,name);
|
||||
gv->get_attr = get_attr;
|
||||
gv->set_attr = set_attr;
|
||||
gv->next = v->vars;
|
||||
swig_varlinkobject *v = (swig_varlinkobject *) p;
|
||||
swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
|
||||
if (gv) {
|
||||
gv->name = (char *) malloc(strlen(name)+1);
|
||||
strcpy(gv->name,name);
|
||||
gv->get_attr = get_attr;
|
||||
gv->set_attr = set_attr;
|
||||
gv->next = v->vars;
|
||||
}
|
||||
v->vars = gv;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ PySwigObject_GetType() {
|
|||
(ternaryfunc)0, /*tp_call*/
|
||||
(reprfunc)PySwigObject_str, /*tp_str*/
|
||||
/* Space for future expansion */
|
||||
0L,0L,0L,0L,
|
||||
0,0,0,0,
|
||||
PySwigObject_Type__doc__, /* Documentation string */
|
||||
#if PY_VERSION_HEX >= 0x02000000
|
||||
0, /* tp_traverse */
|
||||
|
|
@ -354,7 +354,7 @@ PySwigPacked_GetType() {
|
|||
(ternaryfunc)0, /*tp_call*/
|
||||
(reprfunc)PySwigPacked_str, /*tp_str*/
|
||||
/* Space for future expansion */
|
||||
0L,0L,0L,0L,
|
||||
0,0,0,0,
|
||||
PySwigPacked_Type__doc__, /* Documentation string */
|
||||
#if PY_VERSION_HEX >= 0x02000000
|
||||
0, /* tp_traverse */
|
||||
|
|
@ -605,7 +605,7 @@ type_error:
|
|||
char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
|
||||
c = doc ? strstr(doc, "swig_ptr: ") : 0;
|
||||
if (c) {
|
||||
c = SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name);
|
||||
c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
|
||||
if (!c) goto type_error;
|
||||
goto type_check;
|
||||
}
|
||||
|
|
@ -748,7 +748,7 @@ SWIG_Python_GetModule() {
|
|||
return (swig_module_info *) type_pointer;
|
||||
}
|
||||
|
||||
SWIGINTERN void
|
||||
SWIGRUNTIME void
|
||||
SWIG_Python_SetModule(swig_module_info *swig_module) {
|
||||
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
|
||||
|
||||
|
|
@ -758,8 +758,7 @@ SWIG_Python_SetModule(swig_module_info *swig_module) {
|
|||
if (pointer && module) {
|
||||
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue