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:
parent
35a33dfff4
commit
a0030c7626
1 changed files with 7 additions and 10 deletions
|
|
@ -219,17 +219,15 @@ There are no char *OUTPUT typemaps, however you can apply the signed char * type
|
|||
$1 = &temp;
|
||||
}
|
||||
|
||||
%typemap(directorout) TYPE *OUTPUT, TYPE &OUTPUT {
|
||||
#error "Need to provide OUTPUT directorout typemap"
|
||||
%typemap(directorout,warning="Need to provide TYPE *OUTPUT directorout typemap") TYPE *OUTPUT, TYPE &OUTPUT {
|
||||
}
|
||||
|
||||
%typemap(directorin,descriptor=JNIDESC) TYPE &OUTPUT
|
||||
%{ *(($&1_ltype) $input = &$1; %}
|
||||
|
||||
%typemap(directorin,descriptor=JNIDESC) TYPE *OUTPUT
|
||||
%{
|
||||
#error "Need to provide OUT directorin typemap, TYPE array length is unknown"
|
||||
%}
|
||||
%typemap(directorin,descriptor=JNIDESC,warning="Need to provide TYPE *OUTPUT directorin typemap, TYPE array length is unknown") 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);
|
||||
}
|
||||
|
||||
%typemap(directorout) TYPE *INOUT, TYPE &INOUT {
|
||||
#error "Need to provide INOUT directorout typemap"
|
||||
%typemap(directorout,warning="Need to provide TYPE *INOUT directorout typemap") TYPE *INOUT, TYPE &INOUT {
|
||||
|
||||
}
|
||||
|
||||
%typemap(directorin,descriptor=JNIDESC) TYPE &INOUT
|
||||
%{ *(($&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 ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue