diff --git a/SWIG/Lib/python/pyinout.swg b/SWIG/Lib/python/pyinout.swg index dd79b88f7..e0623487d 100644 --- a/SWIG/Lib/python/pyinout.swg +++ b/SWIG/Lib/python/pyinout.swg @@ -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; diff --git a/SWIG/Lib/python/pyptrtypes.swg b/SWIG/Lib/python/pyptrtypes.swg index c918a84ca..c3106f6ae 100644 --- a/SWIG/Lib/python/pyptrtypes.swg +++ b/SWIG/Lib/python/pyptrtypes.swg @@ -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; } diff --git a/SWIG/Lib/python/pyswigtype.swg b/SWIG/Lib/python/pyswigtype.swg index b3d741cfe..348347335 100644 --- a/SWIG/Lib/python/pyswigtype.swg +++ b/SWIG/Lib/python/pyswigtype.swg @@ -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; +} + /* -----------------------------------------------------------------------------