diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2006-06-05 21:03:57 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2006-06-05 21:03:57 +0000 |
commit | 5723482a4947d6dca1b0d796e33bd1914bd774ea (patch) | |
tree | 43754cb7c76fe35c715c97985233fd98705f1675 /Lib | |
parent | d228d4225c33300d9da31e1d6990c633d455aa1d (diff) | |
download | swig-5723482a4947d6dca1b0d796e33bd1914bd774ea.tar.gz |
Add warning for directorout typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9147 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/csharp/csharp.swg | 6 | ||||
-rw-r--r-- | Lib/java/java.swg | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg index 203eb3de4..982c11e7f 100644 --- a/Lib/csharp/csharp.swg +++ b/Lib/csharp/csharp.swg @@ -194,7 +194,7 @@ /* char * - treat as String */ %typemap(in) char * %{ $1 = ($1_ltype)$input; %} %typemap(out) char * %{ $result = SWIG_csharp_string_callback((const char *)$1); %} -%typemap(directorout) char * %{ $1 = ($1_ltype)$input; %} +%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) char * %{ $1 = ($1_ltype)$input; %} %typemap(directorin) char * %{ $input = SWIG_csharp_string_callback((const char *)$1); %} %typemap(csdirectorin) char * "$iminput" %typemap(csdirectorout) char * "$cscall" @@ -349,12 +349,12 @@ } %} %typemap(out) SWIGTYPE *, SWIGTYPE & %{ $result = (void *)$1; %} %typemap(out) SWIGTYPE (CLASS::*) %{ $result = (void *)&$1; %} -%typemap(directorout) SWIGTYPE *, SWIGTYPE (CLASS::*) +%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE *, SWIGTYPE (CLASS::*) %{ $1 = ($1_ltype)$input; %} %typemap(directorin) SWIGTYPE *, SWIGTYPE (CLASS::*) %{ $input = (void *) $1; %} -%typemap(directorout) SWIGTYPE & +%typemap(directorout, warning=SWIGWARN_TYPEMAP_DIRECTOROUT_PTR_MSG) SWIGTYPE & %{ if (!$input) { SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Unexpected null return for type $1_type", 0); return $null; diff --git a/Lib/java/java.swg b/Lib/java/java.swg index 4cb16a8ec..5bb22d830 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -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; |