From: <wsf...@us...> - 2011-04-09 23:48:25
|
Revision: 12622 http://swig.svn.sourceforge.net/swig/?rev=12622&view=rev Author: wsfulton Date: 2011-04-09 23:48:19 +0000 (Sat, 09 Apr 2011) Log Message: ----------- Cosmetics - Fix bracket matching Modified Paths: -------------- trunk/Lib/python/builtin.swg trunk/Lib/python/pyapi.swg trunk/Lib/python/pyrun.swg trunk/Lib/tcl/tclrun.swg Modified: trunk/Lib/python/builtin.swg =================================================================== --- trunk/Lib/python/builtin.swg 2011-04-09 23:08:03 UTC (rev 12621) +++ trunk/Lib/python/builtin.swg 2011-04-09 23:48:19 UTC (rev 12622) @@ -188,6 +188,10 @@ 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 @@ type->ob_type = metatype; #endif } + +#ifdef __cplusplus +} +#endif Modified: trunk/Lib/python/pyapi.swg =================================================================== --- trunk/Lib/python/pyapi.swg 2011-04-09 23:08:03 UTC (rev 12621) +++ trunk/Lib/python/pyapi.swg 2011-04-09 23:48:19 UTC (rev 12622) @@ -4,10 +4,7 @@ #ifdef __cplusplus extern "C" { -#if 0 -} /* cc-mode */ #endif -#endif /* ----------------------------------------------------------------------------- * Constant declarations @@ -45,9 +42,6 @@ #endif #ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif } #endif Modified: trunk/Lib/python/pyrun.swg =================================================================== --- trunk/Lib/python/pyrun.swg 2011-04-09 23:08:03 UTC (rev 12621) +++ trunk/Lib/python/pyrun.swg 2011-04-09 23:48:19 UTC (rev 12622) @@ -231,10 +231,7 @@ #ifdef __cplusplus extern "C" { -#if 0 -} /* cc-mode */ #endif -#endif /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) @@ -1528,11 +1525,13 @@ SWIGRUNTIME void #ifdef SWIGPY_USE_CAPSULE SWIG_Python_DestroyModule(PyObject *obj) +#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_Python_DestroyModule(void *vptr) -{ swig_module_info *swig_module = (swig_module_info *) vptr; #endif swig_type_info **types = swig_module->types; @@ -1561,14 +1560,17 @@ 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 @@ 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 @@ #ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif } #endif Modified: trunk/Lib/tcl/tclrun.swg =================================================================== --- trunk/Lib/tcl/tclrun.swg 2011-04-09 23:08:03 UTC (rev 12621) +++ trunk/Lib/tcl/tclrun.swg 2011-04-09 23:48:19 UTC (rev 12622) @@ -71,10 +71,7 @@ #ifdef __cplusplus extern "C" { -#if 0 -} /* cc-mode */ #endif -#endif /* Object support */ @@ -683,8 +680,5 @@ } #ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |