Cast pointers through uintptr_t under JNI
Fixes warnings of the form "warning: cast to pointer from integer of different size" when building on 32 bit platforms. This is the same approach used for pointer conversions in the openjdk sources.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "org_bitcoin_Secp256k1Context.h"
|
||||
#include "include/secp256k1.h"
|
||||
|
||||
@@ -9,6 +10,6 @@ SECP256K1_API jlong JNICALL Java_org_bitcoin_Secp256k1Context_secp256k1_1init_1c
|
||||
|
||||
(void)classObject;(void)env;
|
||||
|
||||
return (jlong)ctx;
|
||||
return (uintptr_t)ctx;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user