After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 793482 - The gobject-introspection interface is not usable because of incorrect function annotations
The gobject-introspection interface is not usable because of incorrect functi...
Status: RESOLVED FIXED
Product: lasem
Classification: Other
Component: DOM
git master
Other All
: Normal enhancement
: ---
Assigned To: lasem-maint
lasem-maint
Depends on:
Blocks:
 
 
Reported: 2018-02-15 10:08 UTC by TitanSnow
Modified: 2018-02-15 10:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description TitanSnow 2018-02-15 10:08:25 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.
Comment 1 Emmanuel Pacaud 2018-02-15 10:33:45 UTC
I have pushed some fixes to master.

Don't hesitate to experiment with the introspection annotations and propose patches.

Thanks for the report.

Cheers.