Skip to content

Fundamental type support

Arjan Molenaar requested to merge amolenaar/pygobject:fundamental-types into master

Based off of !248 (merged).

This MR takes the work already done in #8 (closed). I added some extra tests and implemented some corner cases.

Credits go to Simon van der Linden, Tomeu Vizoso, and Bastian Winkler, who already did most of the work (#8 (closed)).

Out of scope:

  • Fundamental object types cannot be read from GValues, which includes properties (e.g. Gtk.StringFilter.props.expression). Since this involves hooking up custom GValue getters and setters, I consider this out of scope for this MR.
  • I did not touch GParamSpec.

Implementation notes:

  • The Regress mode (C code) may contain some strange transfer modes. This is my lack of understanding about how it should work.
  • I tried to move as little code around as possible. As a result, pygi-fundamental.c has to include pygobject-object.h in order to look up classes.

Fixes: #8 (closed), #483 (closed)

Edited by Arjan Molenaar

Merge request reports