Add warning for directorout typemaps

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9147 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-06-05 21:03:57 +00:00
commit 5723482a49
2 changed files with 6 additions and 6 deletions

View file

@ -347,7 +347,7 @@
}
}
%typemap(directorout, noblock=1) char * {
%typemap(directorout, noblock=1, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) char * {
$1 = 0;
if ($input) {
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
@ -593,12 +593,12 @@
%typemap(out) SWIGTYPE &
%{ *($&1_ltype)&$result = $1; %}
%typemap(directorout) SWIGTYPE *, SWIGTYPE (CLASS::*)
%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE *, SWIGTYPE (CLASS::*)
%{ $1 = *($&1_ltype)&$input; %}
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE *, SWIGTYPE (CLASS::*)
%{ *(($&1_ltype)&$input) = ($1_ltype) $1; %}
%typemap(directorout) SWIGTYPE &
%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE &
%{ if (!$input) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Unexpected null return for type $1_type");
return $null;