Skip to content

Draft: Support fundamental types

PyGObject does not work well with fundamental types (e.g. Gtk.Expression).

This MR is an attempt to implement support for fundamental types by using a base class (GFundamentalType).

It is quite tricky though, since there's no super type for all GType based classes. Therefore we know that something is GType based (it's "inheriting" from GTypeInstance) only because it is defined as an "Object" in the typelib.

Status so far:

  • created a (simple) PyGFundamentalType
  • an instance can be created via GObjectMeta
  • Item can be created via a constructor method (currently SEGFAULT's, is the overrides logic interfering?)
  • Full round-trip

Some tests in tests/test_fundamental.py are skipped. Those tests seem to make Python crash.

Merge request reports