|
From: Vadim Z. <vz...@ze...> - 2013-09-11 01:22:42
|
Hello again,
I'm successfully using
%typemap(javaimports, noblock=1) Klass { import MAIN_MODULE.*; }
where MAIN_MODULE is predefined outside of the file (which can be used with
different modules) but I can't make
%pragma(java) jniclassimports={ import MAIN_MODULE.*; }
to work because either the pragma value is not expanded or I get a syntax
error (e.g. when trying "%{...%}").
I can work around this by doing
#if MAIN_MODULE_IS_FOO
%pragma(java) jniclassimports={ import Foo.*; }
#elif MAIN_MODULE_IS_BAR
%pragma(java) jniclassimports={ import Bar.*; }
#endif
of course, but I was just wondering if there is any way to preprocess the
pragma value directly? The discrepancy between javaimports typemap and
jniclassimports pragma is rather bothersome (of course, this isn't
Java-specific, it's the same thing for C#).
Thanks,
VZ
|