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:
William S Fulton 2011-04-09 23:48:19 +00:00
commit f1234aae42
4 changed files with 22 additions and 26 deletions

View file

@ -188,6 +188,10 @@ wrapper##_closure(PyObject *a) { \
return result; \ return result; \
} }
#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN int SWIGINTERN int
SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject *SWIGUNUSEDPARM(kwds)) { 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); 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; type->ob_type = metatype;
#endif #endif
} }
#ifdef __cplusplus
}
#endif

View file

@ -4,9 +4,6 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#if 0
} /* cc-mode */
#endif
#endif #endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
@ -45,9 +42,6 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
#if 0
{ /* cc-mode */
#endif
} }
#endif #endif

View file

@ -231,9 +231,6 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#if 0
} /* cc-mode */
#endif
#endif #endif
/* How to access Py_None */ /* How to access Py_None */
@ -1528,11 +1525,13 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
SWIGRUNTIME void SWIGRUNTIME void
#ifdef SWIGPY_USE_CAPSULE #ifdef SWIGPY_USE_CAPSULE
SWIG_Python_DestroyModule(PyObject *obj) SWIG_Python_DestroyModule(PyObject *obj)
{
swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
#else #else
SWIG_Python_DestroyModule(void *vptr) 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; swig_module_info *swig_module = (swig_module_info *) vptr;
#endif #endif
swig_type_info **types = swig_module->types; 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); PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
} else {
Py_XDECREF(pointer);
}
#else #else
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
#endif
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
#endif
} }
/* The python cached type query */ /* 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); name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
if (!name) if (!name)
return -1; return -1;
} else if (!PyUnicode_Check(name)) { } else if (!PyUnicode_Check(name))
#else #else
if (!PyString_Check(name)) { if (!PyString_Check(name))
#endif #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 { } else {
Py_INCREF(name); Py_INCREF(name);
} }
if (!tp->tp_dict) { if (!tp->tp_dict) {
@ -1770,8 +1773,5 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
#ifdef __cplusplus #ifdef __cplusplus
#if 0
{ /* cc-mode */
#endif
} }
#endif #endif

View file

@ -71,9 +71,6 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#if 0
} /* cc-mode */
#endif
#endif #endif
/* Object support */ /* Object support */
@ -683,8 +680,5 @@ SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char
} }
#ifdef __cplusplus #ifdef __cplusplus
#if 0
{ /* cc-mode */
#endif
} }
#endif #endif