don't use in error messages, it can generate extra entries in the symbol table
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6556 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c70186d5d7
commit
36219d31d8
3 changed files with 24 additions and 21 deletions
|
|
@ -65,7 +65,7 @@ or you can use the %apply directive :
|
|||
res = SWIG_NEWOBJ;
|
||||
}
|
||||
if (!$1) {
|
||||
SWIG_null_ref(SWIG_TypePrettyName($1_descriptor));
|
||||
SWIG_null_ref("$basetype");
|
||||
}
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
}
|
||||
|
|
@ -79,10 +79,10 @@ or you can use the %apply directive :
|
|||
%typemap(in,fragment=asptr_frag) Type *INPUT(int res = 0) {
|
||||
res = asptr_meth($input, &$1);
|
||||
if (!res) {
|
||||
SWIG_type_error(SWIG_TypePrettyName($1_descriptor), $input);
|
||||
SWIG_type_error("$basetype", $input);
|
||||
} else {
|
||||
if (!$1) {
|
||||
SWIG_null_ref(SWIG_TypePrettyName($1_descriptor));
|
||||
SWIG_null_ref("$basetype");
|
||||
}
|
||||
}
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
|
|
@ -91,10 +91,10 @@ or you can use the %apply directive :
|
|||
%typemap(in,fragment=asptr_frag) Type &INPUT(int res = 0) {
|
||||
res = asptr_meth($input, &$1);
|
||||
if (!res) {
|
||||
SWIG_type_error(SWIG_TypePrettyName($1_descriptor), $input);
|
||||
SWIG_type_error("$basetype", $input);
|
||||
} else {
|
||||
if (!$1) {
|
||||
SWIG_null_ref(SWIG_TypePrettyName($1_descriptor));
|
||||
SWIG_null_ref("$basetype");
|
||||
}
|
||||
}
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
int res = asptr_meth($input, &ptr);
|
||||
if (!res) {
|
||||
if (!PyErr_Occurred())
|
||||
SWIG_type_error(SWIG_TypePrettyName($&1_descriptor), $input);
|
||||
SWIG_type_error("$basetype", $input);
|
||||
} else if (!ptr) {
|
||||
SWIG_null_ref(SWIG_TypePrettyName($&1_descriptor));
|
||||
SWIG_null_ref("$basetype");
|
||||
}
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
$1 = *ptr;
|
||||
|
|
@ -24,9 +24,9 @@
|
|||
res = asptr_meth($input, &ptr);
|
||||
if (!res) {
|
||||
if (!PyErr_Occurred())
|
||||
SWIG_type_error(SWIG_TypePrettyName($1_descriptor), $input);
|
||||
SWIG_type_error("$basetype", $input);
|
||||
} else if (!ptr) {
|
||||
SWIG_null_ref(SWIG_TypePrettyName($1_descriptor));
|
||||
SWIG_null_ref("$basetype");
|
||||
}
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
$1 = ptr;
|
||||
|
|
@ -44,11 +44,11 @@
|
|||
int res = asptr_meth($input, &ptr);
|
||||
if (!res) {
|
||||
if (!PyErr_Occurred())
|
||||
SWIG_type_error(SWIG_TypePrettyName($1_descriptor), $input);
|
||||
SWIG_type_error("$basetype", $input);
|
||||
SWIG_append_msg(" C/C++ variable '$name'");
|
||||
return 1;
|
||||
} else if (!ptr) {
|
||||
SWIG_null_ref(SWIG_TypePrettyName($1_descriptor));
|
||||
SWIG_null_ref("$basetype");
|
||||
SWIG_append_msg(" C/C++ variable '$name'");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,15 @@
|
|||
if (SWIG_arg_fail($argnum)) SWIG_fail;";
|
||||
|
||||
/* Additional check for null references */
|
||||
%typemap(in) SWIGTYPE &
|
||||
"SWIG_Python_ConvertPtr($input, (void **)&$1, $descriptor, SWIG_POINTER_EXCEPTION | $disown);
|
||||
%typemap(in) SWIGTYPE & {
|
||||
SWIG_Python_ConvertPtr($input, (void **)&$1, $descriptor, SWIG_POINTER_EXCEPTION | $disown);
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
if ($1 == NULL) {
|
||||
SWIG_null_ref(SWIG_TypePrettyName($descriptor));
|
||||
SWIG_null_ref("$basetype");
|
||||
}
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;";
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
}
|
||||
|
||||
|
||||
/* Object passed by value. Convert to a pointer */
|
||||
%typemap(in) SWIGTYPE {
|
||||
|
|
@ -33,7 +35,7 @@
|
|||
SWIG_Python_ConvertPtr($input, (void **)&argp, $&descriptor, SWIG_POINTER_EXCEPTION);
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
if (argp == NULL) {
|
||||
SWIG_null_ref(SWIG_TypePrettyName($&descriptor));
|
||||
SWIG_null_ref("$basetype");
|
||||
}
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
$1 = *argp;
|
||||
|
|
@ -41,12 +43,13 @@
|
|||
|
||||
|
||||
/* Pointer to a class member */
|
||||
%typemap(in) SWIGTYPE (CLASS::*)
|
||||
"if ((SWIG_ConvertPacked($input,(void *)(&$1),sizeof($type),$descriptor,0)) == -1) {
|
||||
SWIG_type_error(SWIG_TypePrettyName($descriptor),$input);
|
||||
%typemap(in) SWIGTYPE (CLASS::*) {
|
||||
if ((SWIG_ConvertPacked($input,(void *)(&$1),sizeof($type),$descriptor,0)) == -1) {
|
||||
SWIG_type_error("$basetype",$input);
|
||||
}
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
";
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue