cleaning + comments, and add the nondynamic feature handlers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6266 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
74c523675d
commit
3d5d0f535a
6 changed files with 132 additions and 64 deletions
|
|
@ -4,19 +4,18 @@
|
|||
|
||||
/* Pointers, references, and arrays */
|
||||
|
||||
%typemap(in) SWIGTYPE *, SWIGTYPE []
|
||||
"if ((SWIG_ConvertPtr($input,(void **)(&$1),$1_descriptor,
|
||||
SWIG_POINTER_EXCEPTION | $disown)) == -1) SWIG_fail;";
|
||||
%typemap(in) SWIGTYPE *, SWIGTYPE []
|
||||
"$1 = ($1_ltype)SWIG_MustGetPtr($input, $descriptor, $argnum, SWIG_POINTER_EXCEPTION | $disown);
|
||||
if (PyErr_Occurred()) SWIG_fail;";
|
||||
|
||||
%typemap(in) SWIGTYPE *DISOWN
|
||||
"if ((SWIG_ConvertPtr($input,(void **)(&$1),$1_descriptor,
|
||||
SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN)) == -1) SWIG_fail;";
|
||||
"$1 = ($1_ltype)SWIG_MustGetPtr($input, $descriptor, $argnum, SWIG_POINTER_EXCEPTION | SWIG_POINTER_DISOWN);
|
||||
if (PyErr_Occurred()) SWIG_fail;";
|
||||
|
||||
/* Additional check for null references */
|
||||
%typemap(in) SWIGTYPE &
|
||||
"if ((SWIG_ConvertPtr($input,(void **)(&$1),$1_descriptor,
|
||||
SWIG_POINTER_EXCEPTION | $disown)) == -1)
|
||||
SWIG_fail;
|
||||
"$1 = ($1_ltype)SWIG_MustGetPtr($input, $descriptor, $argnum, SWIG_POINTER_EXCEPTION | $disown);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
if ($1 == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError,\"null reference\");
|
||||
SWIG_fail;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue