Added typemap for SWIGTYPE *DISOWN.

Changed all the calls to SWIG_ConvertPtr to pass a fourth argument of 0.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7414 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Kevin Ruland 2005-09-07 02:06:03 +00:00
commit d908e688ef

View file

@ -74,7 +74,7 @@
/* Object passed by value. Convert to a pointer */
%typemap(in) SWIGTYPE ($&1_ltype tmp)
{
if(SWIG_ConvertPtr(*$input, (void **) &tmp, $&1_descriptor) < 0) {
if(SWIG_ConvertPtr(*$input, (void **) &tmp, $&1_descriptor, 0) < 0) {
SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $&1_descriptor");
}
$1 = *tmp;
@ -85,17 +85,24 @@
SWIGTYPE &
{
/* typemap(in) SWIGTYPE * */
if(SWIG_ConvertPtr(*$input, (void **) &$1, $1_descriptor) < 0) {
if(SWIG_ConvertPtr(*$input, (void **) &$1, $1_descriptor, 0) < 0) {
SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $&1_descriptor");
}
}
%typemap(in) SWIGTYPE *DISOWN
{
/* typemap(in) SWIGTYPE *DISOWN */
if(SWIG_ConvertPtr(*$input, (void **) &$1, $1_descriptor, SWIG_POINTER_DISOWN ) < 0) {
SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $&1_descriptor");
}
}
%typemap(argout) SWIGTYPE *,
SWIGTYPE [],
SWIGTYPE&;
%typemap(in) void *
{
if(SWIG_ConvertPtr(*$input, (void **) &$1, 0) < 0) {
if(SWIG_ConvertPtr(*$input, (void **) &$1, 0, 0) < 0) {
/* Allow NULL from php for void* */
if ((*$input)->type==IS_NULL) $1=0;
else
@ -110,7 +117,7 @@
{
/* If they pass NULL by reference, make it into a void*
This bit should go in arginit if arginit support init-ing scripting args */
if(SWIG_ConvertPtr(*$input, (void **) &$1, $1_descriptor) < 0) {
if(SWIG_ConvertPtr(*$input, (void **) &$1, $1_descriptor, 0) < 0) {
/* So... we didn't get a ref or ptr, but we'll accept NULL by reference */
if ((*$input)->type==IS_NULL && PZVAL_IS_REF(*$input)) {
#ifdef __cplusplus
@ -248,7 +255,7 @@
{
/* typecheck SWIGTYPE * */
void *tmp;
_v = (SWIG_ConvertPtr( *$input, (void**)&tmp, $1_descriptor) < 0)? 0:1;
_v = (SWIG_ConvertPtr( *$input, (void**)&tmp, $1_descriptor, 0) < 0)? 0:1;
}
%typecheck(SWIG_TYPECHECK_VOIDPTR) void *