Re: Unresolved type and Constructors must return an instance of their class warnings
- From: Philip Withnall <philip tecnocode co uk>
- To: Tom Schoonjans <tom schoonjans me com>, gir-devel-list gnome org
- Subject: Re: Unresolved type and Constructors must return an instance of their class warnings
- Date: Tue, 30 Oct 2018 19:29:37 +0000
On Mon, 2018-10-22 at 17:14 +0100, Tom Schoonjans via gir-devel-list wrote: Dear all,
I am for the first trying to add support for gobject-introspection to one of my projects. After going through the docs and a lot of existing code for inspiration (graphene mostly), I seem to have gotten stuck as I keep getting "Unresolved type" and "Constructors must return an instance of their class" warnings for my boxed types, making the resulting typelib useless as all methods are non-introspectable.
From what I can tell from the gir file, it would appear that my boxed types are properly recognised, and matched with the corresponding *_get_type() functions. The methods that use these types however are only matched with the c:type and not the record name…
My guess would be that your types don’t follow GObject naming conventions. The GType system, GObject, and GI, all expect that types are named in CamelCase. There are various places throughout the GObject introspection machinery which convert lowercase_underscore_names into CamelCaseNames. For example, GI might be converting a function name gi_test_foo_new into a proposed class name GiTestFoo, and then erroring because the function actually returns a gi_test_foo.
Philip
|
Attachment:
signature.asc
Description: This is a digitally signed message part
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]