I've got the following swig file:
%module test
%ignore Stats;
%typemap(jstype) Stats* ""
%typemap(javain) Stats* "0"
void initialize(Stats* s);
I would like to suppress the 'Stats* s' parameter from the module class and just pass '0' to the JNI function
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
public class test {
public static void initialize( s) { // How to supppress this parameter ?
testJNI.initialize(0);
}
}
I could not get rid of the parameter of the initialize method. Do you know what is the correct typemaps?
I read something about javaparams, but could not any documentation about it, and does not seems to work, or I do not use it correctly.
typemapsare part of SWIG.Ctag applicable. (FWIW, I quit on SWIG a long time ago - it's harder to understand than just learning JNI or Python'sctypes, and in my actual experience it's a lot less reliable. Nevermind the generated code is rife with undefined behavior...)