GNOME Bugzilla – Bug 793482
The gobject-introspection interface is not usable because of incorrect function annotations
Last modified: 2018-02-15 10:33:45 UTC
I am trying to use Lasem through PyGI, in which I have trouble. The function annotations seem to be incorrect, which makes the gi interface not usable. The list of APIs whose annotations I think is incorrect: * `lsm_dom_document_append_from_memory` and `lsm_dom_document_new_from_memory`: The type of the argument `buffer` is `const void*`, which in PyGI it accepts neither string nor `bytes`, instead it accepts integer. It should be `const char*` so that I can pass string. * `lsm_dom_document_save_to_memory`: The type of the argument `buffer` should be `char**` and it should be marked as “out”. * `lsm_dom_view_get_size` and `lsm_dom_view_get_size_pixels`: The arguments `width`, `height` and `baseline` should be marked as “out” so that they will be returned as return value in PyGI, not arguments that I need to pass pointers, which is impossible in Python.
I have pushed some fixes to master. Don't hesitate to experiment with the introspection annotations and propose patches. Thanks for the report. Cheers.