-
-
Notifications
You must be signed in to change notification settings - Fork 88
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 #633
Conversation
} | ||
} | ||
return(0); | ||
} | ||
|
||
int handle_add(kiwix::Library* library, const std::string& libraryPath, | ||
int handle_add(kiwix::LibraryPtr library, const std::string& libraryPath, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that a parameter of type kiwix::Library&
is more suitable here (passing a shared_ptr
suggests that it is preserved somewhere and can be accessed after the function returns).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We pass the library to the Manager
which take a LibraryPtr
.
So I have keep LibraryPtr
instead of kiwix::Library&
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the Manager
object is completely internal to handle_add()
(it no longer exists when the function returns) it would be perfectly safe to convert the Library&
into a non-owning shared_ptr
inside the function.
13d8333
to
61055ef
Compare
61055ef
to
018df0d
Compare
Would be good to merge soon, it is breaking CI of many projects. |
The two first commits are not especially related to kiwix/likiwix#991 but it fix the CI and without them, no PR pass. It was simpler to make on PR than two PR and merge one that was broken, expecting that the other would be fixed after. |
This PR fixes the CI which is broken since several days now. |
@mgautierfr The only comment that I had doesn't deserve an issue. |
See kiwix/libkiwix#991 for more details