use jlong to store pointer
needed for 64bit build
This commit is contained in:
parent
7e0e71a424
commit
aceac3b97e
3 changed files with 11 additions and 11 deletions
|
@ -17,8 +17,8 @@ public class NativeLibrary {
|
|||
|
||||
public static class NativeSearchResult {
|
||||
|
||||
public int nativeHandler;
|
||||
private NativeSearchResult(int nativeHandler) {
|
||||
public long nativeHandler;
|
||||
private NativeSearchResult(long nativeHandler) {
|
||||
this.nativeHandler = nativeHandler;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class NativeLibrary {
|
|||
}
|
||||
|
||||
|
||||
protected static native void deleteSearchResult(int searchResultHandle);
|
||||
protected static native void deleteSearchResult(long searchResultHandle);
|
||||
|
||||
protected static native boolean initBinaryMapFile(String filePath);
|
||||
|
||||
|
@ -66,10 +66,10 @@ public class NativeLibrary {
|
|||
protected static native void initRenderingRulesStorage(RenderingRulesStorage storage);
|
||||
|
||||
|
||||
protected static native RenderingGenerationResult generateRenderingIndirect(RenderingContext rc, int searchResultHandler,
|
||||
protected static native RenderingGenerationResult generateRenderingIndirect(RenderingContext rc, long searchResultHandler,
|
||||
boolean isTransparent, RenderingRuleSearchRequest render, boolean encodePng);
|
||||
|
||||
protected static native int searchNativeObjectsForRendering(int sleft, int sright, int stop, int sbottom, int zoom,
|
||||
protected static native long searchNativeObjectsForRendering(int sleft, int sright, int stop, int sbottom, int zoom,
|
||||
RenderingRuleSearchRequest request, boolean skipDuplicates, Object objectWithInterruptedField, String msgIfNothingFound);
|
||||
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ public class NativeOsmandLibrary extends NativeLibrary {
|
|||
}
|
||||
|
||||
|
||||
private static native RenderingGenerationResult generateRenderingDirect(RenderingContext rc, int searchResultHandler,
|
||||
private static native RenderingGenerationResult generateRenderingDirect(RenderingContext rc, long searchResultHandler,
|
||||
Bitmap bitmap, RenderingRuleSearchRequest render);
|
||||
|
||||
public static native int getCpuCount();
|
||||
|
|
|
@ -60,7 +60,7 @@ extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved)
|
|||
}
|
||||
|
||||
extern "C" JNIEXPORT void JNICALL Java_net_osmand_NativeLibrary_deleteSearchResult(JNIEnv* ienv,
|
||||
jobject obj, jint searchResult) {
|
||||
jobject obj, jlong searchResult) {
|
||||
ResultPublisher* result = (ResultPublisher*) searchResult;
|
||||
if(result != NULL){
|
||||
delete result;
|
||||
|
@ -119,7 +119,7 @@ RenderingRuleSearchRequest* initSearchRequest(JNIEnv* env, jobject renderingRule
|
|||
}
|
||||
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL Java_net_osmand_NativeLibrary_searchNativeObjectsForRendering(JNIEnv* ienv,
|
||||
extern "C" JNIEXPORT jlong JNICALL Java_net_osmand_NativeLibrary_searchNativeObjectsForRendering(JNIEnv* ienv,
|
||||
jobject obj, jint sleft, jint sright, jint stop, jint sbottom, jint zoom,
|
||||
jobject renderingRuleSearchRequest, bool skipDuplicates, jobject objInterrupted, jstring msgNothingFound) {
|
||||
RenderingRuleSearchRequest* req = initSearchRequest(ienv, renderingRuleSearchRequest);
|
||||
|
@ -137,7 +137,7 @@ extern "C" JNIEXPORT jint JNICALL Java_net_osmand_NativeLibrary_searchNativeObje
|
|||
|
||||
ResultPublisher* res = searchObjectsForRendering(&q, skipDuplicates, getString(ienv, msgNothingFound));
|
||||
delete req;
|
||||
return (jint) j;
|
||||
return (jlong) j;
|
||||
}
|
||||
|
||||
|
||||
|
@ -148,7 +148,7 @@ extern "C" JNIEXPORT jint JNICALL Java_net_osmand_NativeLibrary_searchNativeObje
|
|||
#include <android/bitmap.h>
|
||||
|
||||
extern "C" JNIEXPORT jobject JNICALL Java_net_osmand_plus_render_NativeOsmandLibrary_generateRenderingDirect( JNIEnv* ienv, jobject obj,
|
||||
jobject renderingContext, jint searchResult, jobject targetBitmap, jobject renderingRuleSearchRequest) {
|
||||
jobject renderingContext, jlong searchResult, jobject targetBitmap, jobject renderingRuleSearchRequest) {
|
||||
|
||||
// libJniGraphics interface
|
||||
typedef int (*PTR_AndroidBitmap_getInfo)(JNIEnv*, jobject, AndroidBitmapInfo*);
|
||||
|
@ -266,7 +266,7 @@ extern "C" JNIEXPORT jobject JNICALL Java_net_osmand_plus_render_NativeOsmandLib
|
|||
void* bitmapData = NULL;
|
||||
size_t bitmapDataSize = 0;
|
||||
extern "C" JNIEXPORT jobject JNICALL Java_net_osmand_NativeLibrary_generateRenderingIndirect( JNIEnv* ienv,
|
||||
jobject obj, jobject renderingContext, jint searchResult, jboolean isTransparent,
|
||||
jobject obj, jobject renderingContext, jlong searchResult, jboolean isTransparent,
|
||||
jobject renderingRuleSearchRequest, jboolean encodePNG) {
|
||||
|
||||
JNIRenderingContext rc;
|
||||
|
|
Loading…
Reference in a new issue