Open dvogel opened 1 year ago
There is an assert
in the code to ensure the returned value is >= 0. It'll panic if it isn't the case so it can never return something less than 0.
It might a bit problematic because it can actually return -1
with our code since we accept nullable arguments and the function returns -1
if an argument is nullable. So either we don't allow the arguments to be nullable, or we return Option<u32>
.
If the function doesn't allow NULL
then we should not allow passing None
.
But I think this can actually fail in other ways, can't it? It calls into a virtual method somewhere and it looks like at least the default implementation of that can also fail in other reasons (if the page already was added to another notebook maybe?).
Bug description
Please provide a code sample as small as possible which reproduces the bug.
Upstream
gtk_notebook_append_page
returns a gint. In gtk3-rsNotebookExtManual.append_page
returns a u32. The documentation says the function will return -1 on error, which is impossible in the rust code.