Adapt to new api introduced in kiwix/libkiwix#991

This commit is contained in:
Matthieu Gautier 2023-08-23 17:31:25 +02:00 committed by Emmanuel Engelhart
parent 8f2470d85d
commit 242db418de
No known key found for this signature in database
GPG Key ID: 120B30D020B553D3
3 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@
METHOD(void, setNativeServer, jobject jLibrary)
{
auto library = getPtr<kiwix::Library>(env, jLibrary);
SET_PTR(std::make_shared<NATIVE_TYPE>(library.get()));
SET_PTR(std::make_shared<NATIVE_TYPE>(library));
} catch (std::exception& e) {
throwException(env, "java/lang/Exception", "Error creating the server");
} CATCH_EXCEPTION()

View File

@ -31,7 +31,7 @@
/* Kiwix Reader JNI functions */
METHOD0(void, setNativeHandler)
{
SET_PTR(std::make_shared<NATIVE_TYPE>());
SET_PTR(NATIVE_TYPE::create());
} CATCH_EXCEPTION()
DISPOSE

View File

@ -31,7 +31,7 @@
METHOD(void, allocate, jobject libraryObj)
{
auto lib = getPtr<kiwix::Library>(env, libraryObj);
SET_PTR(std::make_shared<NATIVE_TYPE>(lib.get()));
SET_PTR(std::make_shared<NATIVE_TYPE>(lib));
} CATCH_EXCEPTION()
DISPOSE