Workaround for #error in typemaps erroring out when swig is running rather than when the compiler executes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7665 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-10-15 22:23:25 +00:00
commit a0030c7626

View file

@ -219,17 +219,15 @@ There are no char *OUTPUT typemaps, however you can apply the signed char * type
$1 = &temp; $1 = &temp;
} }
%typemap(directorout) TYPE *OUTPUT, TYPE &OUTPUT { %typemap(directorout,warning="Need to provide TYPE *OUTPUT directorout typemap") TYPE *OUTPUT, TYPE &OUTPUT {
#error "Need to provide OUTPUT directorout typemap"
} }
%typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT %typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT
%{ *(($&1_ltype) $input = &$1; %} %{ *(($&1_ltype) $input = &$1; %}
%typemap(directorin,descriptor=JNIDESC) TYPE *OUTPUT %typemap(directorin,descriptor=JNIDESC,warning="Need to provide TYPE *OUTPUT directorin typemap, TYPE array length is unknown") TYPE *OUTPUT
%{ {
#error "Need to provide OUT directorin typemap, TYPE array length is unknown" }
%}
%typemap(freearg) TYPE *OUTPUT, TYPE &OUTPUT "" %typemap(freearg) TYPE *OUTPUT, TYPE &OUTPUT ""
@ -359,16 +357,15 @@ There are no char *INOUT typemaps, however you can apply the signed char * typem
$1 = ($1_ltype) JCALL2(Get##JAVATYPE##ArrayElements, jenv, $input, 0); $1 = ($1_ltype) JCALL2(Get##JAVATYPE##ArrayElements, jenv, $input, 0);
} }
%typemap(directorout) TYPE *INOUT, TYPE &INOUT { %typemap(directorout,warning="Need to provide TYPE *INOUT directorout typemap") TYPE *INOUT, TYPE &INOUT {
#error "Need to provide INOUT directorout typemap"
} }
%typemap(directorin,descriptor=JNIDESC) TYPE &INOUT %typemap(directorin,descriptor=JNIDESC) TYPE &INOUT
%{ *(($&1_ltype)&$input) = &$1; %} %{ *(($&1_ltype)&$input) = &$1; %}
%typemap(directorin,descriptor=JNIDESC) TYPE *INOUT, TYPE &INOUT %typemap(directorin,descriptor=JNIDESC,warning="Need to provide TYPE *INOUT directorin typemap, TYPE array length is unknown") TYPE *INOUT, TYPE &INOUT
{ {
#error "Need to provide INOUT directorin typemap, TYPE array length is unknown"
} }
%typemap(freearg) TYPE *INOUT, TYPE &INOUT "" %typemap(freearg) TYPE *INOUT, TYPE &INOUT ""