[Java] Note use of %ignore with %native
This is needed if you're wanting to effectively replace the generated JNI wrapper for a C/C++ function. Fixes https://sourceforge.net/p/swig/bugs/368/
This commit is contained in:
parent
9d06d4ac45
commit
eb13261950
1 changed files with 5 additions and 0 deletions
|
|
@ -9062,6 +9062,11 @@ You may have to add in some "jtype", "jstype", "javain" and "javaout" typemaps w
|
||||||
Here the default typemaps work for <tt>int</tt> and <tt>char *</tt>.
|
Here the default typemaps work for <tt>int</tt> and <tt>char *</tt>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Note that if you're wanting to effectively <b>replace</b> the JNI code generated for a C/C++ function then you'll need to use <tt>%ignore</tt> as well
|
||||||
|
to tell SWIG not to automatically generate a JNI wrapper for it.
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
In summary the <tt>%native</tt> directive is telling SWIG to generate the Java code to access the JNI C code, but not the JNI C function itself.
|
In summary the <tt>%native</tt> directive is telling SWIG to generate the Java code to access the JNI C code, but not the JNI C function itself.
|
||||||
This directive is only really useful if you want to mix your own hand crafted JNI code and the SWIG generated code into one Java class or package.
|
This directive is only really useful if you want to mix your own hand crafted JNI code and the SWIG generated code into one Java class or package.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue