Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to new api introduced in kiwix/libkiwix#991 #68

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ ext {
}

// Replace these versions with the latest available versions of libkiwix and libzim
ext.libkiwix_version = "12.1.0"
ext.libzim_version = "8.2.1"
ext.libkiwix_version = "13.0.0"
ext.libzim_version = "9.0.0"

apply from: 'publish.gradle'
android {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/main/cpp/libkiwix/kiwixserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion lib/src/main/cpp/libkiwix/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/src/main/cpp/libkiwix/manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down