Cosmetics - Fix bracket matching
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12622 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
abdd41dc91
commit
f1234aae42
4 changed files with 22 additions and 26 deletions
|
|
@ -188,6 +188,10 @@ wrapper##_closure(PyObject *a) { \
|
|||
return result; \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SWIGINTERN int
|
||||
SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject *SWIGUNUSEDPARM(kwds)) {
|
||||
PyErr_Format(PyExc_TypeError, "Cannot create new instances of type '%.300s'", self->ob_type->tp_name);
|
||||
|
|
@ -471,3 +475,7 @@ SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
|
|||
type->ob_type = metatype;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -4,9 +4,6 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#if 0
|
||||
} /* cc-mode */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
|
@ -45,9 +42,6 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
|
|||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if 0
|
||||
{ /* cc-mode */
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -231,9 +231,6 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#if 0
|
||||
} /* cc-mode */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* How to access Py_None */
|
||||
|
|
@ -1528,11 +1525,13 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
|
|||
SWIGRUNTIME void
|
||||
#ifdef SWIGPY_USE_CAPSULE
|
||||
SWIG_Python_DestroyModule(PyObject *obj)
|
||||
{
|
||||
swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
|
||||
#else
|
||||
SWIG_Python_DestroyModule(void *vptr)
|
||||
#endif
|
||||
{
|
||||
#ifdef SWIGPY_USE_CAPSULE
|
||||
swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
|
||||
#else
|
||||
swig_module_info *swig_module = (swig_module_info *) vptr;
|
||||
#endif
|
||||
swig_type_info **types = swig_module->types;
|
||||
|
|
@ -1561,14 +1560,17 @@ SWIG_Python_SetModule(swig_module_info *swig_module) {
|
|||
PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
|
||||
if (pointer && module) {
|
||||
PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
|
||||
} else {
|
||||
Py_XDECREF(pointer);
|
||||
}
|
||||
#else
|
||||
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
|
||||
if (pointer && module) {
|
||||
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
|
||||
#endif
|
||||
} else {
|
||||
Py_XDECREF(pointer);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* The python cached type query */
|
||||
|
|
@ -1730,14 +1732,15 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
|
|||
name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
|
||||
if (!name)
|
||||
return -1;
|
||||
} else if (!PyUnicode_Check(name)) {
|
||||
} else if (!PyUnicode_Check(name))
|
||||
#else
|
||||
if (!PyString_Check(name)) {
|
||||
if (!PyString_Check(name))
|
||||
#endif
|
||||
PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
|
||||
return -1;
|
||||
{
|
||||
PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
|
||||
return -1;
|
||||
} else {
|
||||
Py_INCREF(name);
|
||||
Py_INCREF(name);
|
||||
}
|
||||
|
||||
if (!tp->tp_dict) {
|
||||
|
|
@ -1770,8 +1773,5 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
|
|||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if 0
|
||||
{ /* cc-mode */
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue