fix more comp. warns
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
58a46d290f
commit
86a9374ea1
3 changed files with 4 additions and 3 deletions
|
|
@ -73,9 +73,9 @@ or you can use the %apply directive :
|
|||
%enddef
|
||||
|
||||
%define _PYPTR_INPUT_TYPEMAP(code,asptr_meth,asptr_frag,Type)
|
||||
%typemap(in,fragment=asptr_frag) Type *INPUT(int res)
|
||||
%typemap(in,fragment=asptr_frag) Type *INPUT(int res = 0)
|
||||
"if (!(res = asptr_meth($input, &$1))) SWIG_fail;";
|
||||
%typemap(in,fragment=asptr_frag) Type &INPUT(int res)
|
||||
%typemap(in,fragment=asptr_frag) Type &INPUT(int res = 0)
|
||||
"if (!(res = asptr_meth($input, &$1)) || !($1)) SWIG_fail;";
|
||||
%typemap(freearg) Type *INPUT, Type &INPUT
|
||||
"if (res$argnum == SWIG_NEWOBJ) delete $1;";
|
||||
|
|
|
|||
|
|
@ -523,7 +523,7 @@ SWIGSTATICINLINE(int)
|
|||
if (val) *val = false;
|
||||
return 1;
|
||||
}
|
||||
int res;
|
||||
int res = 0;
|
||||
if (SWIG_AsVal(int)(obj, &res)) {
|
||||
if (val) *val = (bool)res;
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -184,6 +184,7 @@ statichere PyTypeObject varlinktype = {
|
|||
0, /* tp_cache */
|
||||
0, /* tp_subclasses */
|
||||
0, /* tp_weaklist */
|
||||
0, /* tp_del */
|
||||
#endif
|
||||
#ifdef COUNT_ALLOCS
|
||||
/* these must be last */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue