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:
Jon Griffiths
2016-04-28 20:25:31 +12:00
parent 7b549b1abc
commit 47b9e78e07
2 changed files with 18 additions and 16 deletions

View File

@@ -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;
}