It seems that SWIG pointer-casting is broken:
*(int **)&jresult = result; // shenanigans
return jresult;
It really should just be
jresult= (jlong)result;
How can I hook into SWIG to tell it how to cast?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use a typemap. See doc here for more info. Probably look something like the code below.