Re: Unresolved type and Constructors must return an instance of their class warnings
- From: Tom Schoonjans <tom schoonjans me com>
- To: philip tecnocode co uk
- Cc: gir-devel-list gnome org
- Subject: Re: Unresolved type and Constructors must return an instance of their class warnings
- Date: Thu, 01 Nov 2018 08:14:01 +0000
Hi Philip,
I actually managed to solve it by adding the option —accept-unprefixed to the g-ir-scanner arguments. I am surprised that this is necessary as I was already using —identifier-filter-cmd and —symbol-filter-cmd.
Thanks,
Tom
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
|
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]