Support OSX (ie builds where int64_t is not an alias for jlong)
[ldk-java] / java_strings.py
index 3d5a2a0150cd1c5680d6a51495e27183a93e5ba9..25eec48e83ca9762522e8a5f322efa512c54efb3 100644 (file)
@@ -83,11 +83,13 @@ class CommonBase {
        long ptr;
        LinkedList<Object> ptrs_to = new LinkedList();
        protected CommonBase(long ptr) { this.ptr = ptr; }
-       public long _test_only_get_ptr() { return this.ptr; }
 }
 """
 
-        self.c_file_pfx = """#include \"org_ldk_impl_bindings.h\"
+        self.c_file_pfx = """#include <jni.h>
+// On OSX jlong (ie long long) is not equivalent to int64_t, so we override here
+#define int64_t jlong
+#include \"org_ldk_impl_bindings.h\"
 #include <lightning.h>
 #include <string.h>
 #include <stdatomic.h>