Python warning fixes for gcc -Wall -Wextra
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12584 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
51ef340eed
commit
960b503a72
3 changed files with 57 additions and 47 deletions
|
|
@ -32,7 +32,7 @@ typedef struct swig_const_info {
|
||||||
* Wrapper of PyInstanceMethod_New() used in Python 3
|
* Wrapper of PyInstanceMethod_New() used in Python 3
|
||||||
* It is exported to the generated module, used for -fastproxy
|
* It is exported to the generated module, used for -fastproxy
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
|
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
|
||||||
{
|
{
|
||||||
#if PY_VERSION_HEX >= 0x03000000
|
#if PY_VERSION_HEX >= 0x03000000
|
||||||
return PyInstanceMethod_New(func);
|
return PyInstanceMethod_New(func);
|
||||||
|
|
|
||||||
|
|
@ -179,6 +179,9 @@ swig_varlink_type(void) {
|
||||||
#if PY_VERSION_HEX >= 0x02030000
|
#if PY_VERSION_HEX >= 0x02030000
|
||||||
0, /* tp_del */
|
0, /* tp_del */
|
||||||
#endif
|
#endif
|
||||||
|
#if PY_VERSION_HEX >= 0x02060000
|
||||||
|
0, /* tp_version */
|
||||||
|
#endif
|
||||||
#ifdef COUNT_ALLOCS
|
#ifdef COUNT_ALLOCS
|
||||||
0,0,0,0 /* tp_alloc -> tp_next */
|
0,0,0,0 /* tp_alloc -> tp_next */
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -321,7 +324,6 @@ SWIGEXPORT
|
||||||
#endif
|
#endif
|
||||||
SWIG_init(void) {
|
SWIG_init(void) {
|
||||||
PyObject *m, *d, *md;
|
PyObject *m, *d, *md;
|
||||||
PyTypeObject *builtin_type;
|
|
||||||
#if PY_VERSION_HEX >= 0x03000000
|
#if PY_VERSION_HEX >= 0x03000000
|
||||||
static struct PyModuleDef SWIG_module = {
|
static struct PyModuleDef SWIG_module = {
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
|
|
|
||||||
|
|
@ -416,7 +416,7 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
const char *name = SWIG_TypePrettyName(v->ty);
|
const char *name = SWIG_TypePrettyName(v->ty);
|
||||||
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
|
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, (void *)v);
|
||||||
if (v->next) {
|
if (v->next) {
|
||||||
# ifdef METH_NOARGS
|
# ifdef METH_NOARGS
|
||||||
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
|
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
|
||||||
|
|
@ -804,6 +804,9 @@ SwigPyObject_TypeOnce(void) {
|
||||||
#if PY_VERSION_HEX >= 0x02030000
|
#if PY_VERSION_HEX >= 0x02030000
|
||||||
0, /* tp_del */
|
0, /* tp_del */
|
||||||
#endif
|
#endif
|
||||||
|
#if PY_VERSION_HEX >= 0x02060000
|
||||||
|
0, /* tp_version */
|
||||||
|
#endif
|
||||||
#ifdef COUNT_ALLOCS
|
#ifdef COUNT_ALLOCS
|
||||||
0,0,0,0 /* tp_alloc -> tp_next */
|
0,0,0,0 /* tp_alloc -> tp_next */
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -973,12 +976,15 @@ SwigPyPacked_TypeOnce(void) {
|
||||||
0, /* tp_bases */
|
0, /* tp_bases */
|
||||||
0, /* tp_mro */
|
0, /* tp_mro */
|
||||||
0, /* tp_cache */
|
0, /* tp_cache */
|
||||||
0, /* tp_subclasses */
|
0, /* tp_subclasses */
|
||||||
0, /* tp_weaklist */
|
0, /* tp_weaklist */
|
||||||
#endif
|
#endif
|
||||||
#if PY_VERSION_HEX >= 0x02030000
|
#if PY_VERSION_HEX >= 0x02030000
|
||||||
0, /* tp_del */
|
0, /* tp_del */
|
||||||
#endif
|
#endif
|
||||||
|
#if PY_VERSION_HEX >= 0x02060000
|
||||||
|
0, /* tp_version */
|
||||||
|
#endif
|
||||||
#ifdef COUNT_ALLOCS
|
#ifdef COUNT_ALLOCS
|
||||||
0,0,0,0 /* tp_alloc -> tp_next */
|
0,0,0,0 /* tp_alloc -> tp_next */
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1136,10 +1142,12 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
|
||||||
int res;
|
int res;
|
||||||
SwigPyObject *sobj;
|
SwigPyObject *sobj;
|
||||||
|
|
||||||
if (!obj) return SWIG_ERROR;
|
if (!obj)
|
||||||
|
return SWIG_ERROR;
|
||||||
if (obj == Py_None) {
|
if (obj == Py_None) {
|
||||||
if (ptr) *ptr = 0;
|
if (ptr)
|
||||||
return SWIG_OK;
|
*ptr = 0;
|
||||||
|
return SWIG_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = SWIG_ERROR;
|
res = SWIG_ERROR;
|
||||||
|
|
@ -1667,7 +1675,7 @@ SWIG_Python_TypeError(const char *type, PyObject *obj)
|
||||||
|
|
||||||
/* Convert a pointer value, signal an exception on a type mismatch */
|
/* Convert a pointer value, signal an exception on a type mismatch */
|
||||||
SWIGRUNTIME void *
|
SWIGRUNTIME void *
|
||||||
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
|
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
|
||||||
void *result;
|
void *result;
|
||||||
if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
|
if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue