silence warnings with -O1 -Wall
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8499 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6c078066e3
commit
d56b75b1ac
3 changed files with 14 additions and 14 deletions
|
|
@ -77,7 +77,7 @@ or you can use the %apply directive :
|
|||
#endif
|
||||
|
||||
%define %_value_input_typemap(code, asval_meth, asval_frag, Type)
|
||||
%typemap(in,noblock=1,fragment=asval_frag) Type *INPUT ($*ltype temp, int res) {
|
||||
%typemap(in,noblock=1,fragment=asval_frag) Type *INPUT ($*ltype temp, int res = 0) {
|
||||
if (!%check_input_ptr($input,&$1,$descriptor,$disown)) {
|
||||
Type val;
|
||||
int ecode = asval_meth($input, &val);
|
||||
|
|
@ -89,7 +89,7 @@ or you can use the %apply directive :
|
|||
res = SWIG_AddTmpMask(ecode);
|
||||
}
|
||||
}
|
||||
%typemap(in,noblock=1,fragment=asval_frag) Type &INPUT($*ltype temp, int res) {
|
||||
%typemap(in,noblock=1,fragment=asval_frag) Type &INPUT($*ltype temp, int res = 0) {
|
||||
if (!%check_input_ptr($input,&$1,$descriptor,$disown)) {
|
||||
Type val;
|
||||
int ecode = asval_meth($input, &val);
|
||||
|
|
@ -115,14 +115,14 @@ or you can use the %apply directive :
|
|||
%enddef
|
||||
|
||||
%define %_ptr_input_typemap(code,asptr_meth,asptr_frag,Type)
|
||||
%typemap(in,noblock=1,fragment=asptr_frag) Type *INPUT(int res) {
|
||||
%typemap(in,noblock=1,fragment=asptr_frag) Type *INPUT(int res = 0) {
|
||||
res = asptr_meth($input, &$1);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res,"$type",$symname, $argnum);
|
||||
}
|
||||
res = SWIG_AddTmpMask(res);
|
||||
}
|
||||
%typemap(in,noblock=1,fragment=asptr_frag) Type &INPUT(int res) {
|
||||
%typemap(in,noblock=1,fragment=asptr_frag) Type &INPUT(int res = 0) {
|
||||
res = asptr_meth($input, &$1);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res,"$type",$symname, $argnum);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* --- Input arguments ---
|
||||
* ----------------------------------------------------------------------------- */
|
||||
/* Pointers and arrays */
|
||||
%typemap(in, noblock=1) SWIGTYPE *(void *argp = 0, int res) {
|
||||
%typemap(in, noblock=1) SWIGTYPE *(void *argp = 0, int res = 0) {
|
||||
res = SWIG_ConvertPtr($input, &argp,$descriptor, $disown | %convertptr_flags);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res, "$type", $symname, $argnum);
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
}
|
||||
%typemap(freearg) SWIGTYPE * "";
|
||||
|
||||
%typemap(in, noblock=1) SWIGTYPE [] (void *argp = 0, int res) {
|
||||
%typemap(in, noblock=1) SWIGTYPE [] (void *argp = 0, int res = 0) {
|
||||
res = SWIG_ConvertPtr($input, &argp,$descriptor, $disown | %convertptr_flags);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res, "$type", $symname, $argnum);
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
%typemap(freearg) SWIGTYPE [] "";
|
||||
|
||||
|
||||
%typemap(in, noblock=1) SWIGTYPE* const& (void *argp = 0, int res, $*ltype temp) {
|
||||
%typemap(in, noblock=1) SWIGTYPE* const& (void *argp = 0, int res = 0, $*ltype temp) {
|
||||
res = SWIG_ConvertPtr($input, &argp, $*descriptor, $disown | %convertptr_flags);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res, "$*ltype", $symname, $argnum);
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
|
||||
/* Reference */
|
||||
%typemap(in, noblock=1) SWIGTYPE & (void *argp = 0, int res) {
|
||||
%typemap(in, noblock=1) SWIGTYPE & (void *argp = 0, int res = 0) {
|
||||
res = SWIG_ConvertPtr($input, &argp, $descriptor, %convertptr_flags);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res, "$type", $symname, $argnum);
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
%typemap(freearg) SWIGTYPE & "";
|
||||
|
||||
#if defined(__cplusplus) && defined(%implicitconv_flag)
|
||||
%typemap(in,implicitconv=1) const SWIGTYPE & (void *argp = 0, int res) {
|
||||
%typemap(in,implicitconv=1) const SWIGTYPE & (void *argp = 0, int res = 0) {
|
||||
res = SWIG_ConvertPtr($input, &argp, $descriptor, %convertptr_flags | %implicitconv_flag);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res, "$type", $symname, $argnum);
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
if (SWIG_IsNewObj(res$argnum)) %delete($1);
|
||||
}
|
||||
#else
|
||||
%typemap(in,noblock=1) const SWIGTYPE & (void *argp, int res) {
|
||||
%typemap(in,noblock=1) const SWIGTYPE & (void *argp, int res = 0) {
|
||||
res = SWIG_ConvertPtr($input, &argp, $descriptor, %convertptr_flags);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res, "$type", $symname, $argnum);
|
||||
|
|
@ -354,7 +354,7 @@
|
|||
|
||||
/* directorout */
|
||||
#if defined(__cplusplus) && defined(%implicitconv_flag)
|
||||
%typemap(directorout,noblock=1,implicitconv=1) SWIGTYPE (void * argp, int res) {
|
||||
%typemap(directorout,noblock=1,implicitconv=1) SWIGTYPE (void * argp, int res = 0) {
|
||||
res = SWIG_ConvertPtr($input,&argp,$&descriptor, %convertptr_flags | %implicitconv_flag);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%dirout_fail(res,"$type");
|
||||
|
|
@ -363,7 +363,7 @@
|
|||
if (SWIG_IsNewObj(res)) %delete(%reinterpret_cast(argp, $<ype));
|
||||
}
|
||||
#else
|
||||
%typemap(directorout,noblock=1) SWIGTYPE (void * argp, int res) {
|
||||
%typemap(directorout,noblock=1) SWIGTYPE (void * argp, int res = 0) {
|
||||
res = SWIG_ConvertPtr($input,&argp,$&descriptor, %convertptr_flags);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%dirout_fail(res,"$type");
|
||||
|
|
@ -563,7 +563,7 @@
|
|||
|
||||
/* DISOWN typemap */
|
||||
|
||||
%typemap(in, noblock=1) SWIGTYPE *DISOWN (int res) {
|
||||
%typemap(in, noblock=1) SWIGTYPE *DISOWN (int res = 0) {
|
||||
res = SWIG_ConvertPtr($input, %as_voidptrptr(&$1), $descriptor, SWIG_POINTER_DISOWN | %convertptr_flags);
|
||||
if (!SWIG_IsOK(res)) {
|
||||
%argument_fail(res,"$type", $symname, $argnum);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue