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 660245 - missing g-ir-compiler support for callback in class field (generated by g-ir-scanner)
missing g-ir-compiler support for callback in class field (generated by g-ir-...
Status: RESOLVED DUPLICATE of bug 725198
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2011-09-27 13:22 UTC by Alban Browaeys
Modified: 2015-02-07 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add support for callback in field class to g-ir-compiler (2.44 KB, patch)
2011-09-27 13:22 UTC, Alban Browaeys
none Details | Review

Description Alban Browaeys 2011-09-27 13:22:09 UTC
Created attachment 197569 [details] [review]
add support for callback in field class to g-ir-compiler

Attempting to generate a gir and typelib from evolution-data-server camel I get a:
warning: element callback from state 14 is unknown, ignoring
** ERROR **: Caught NULL node, parent=is_key
error from g-ir-compiler.

It turns out g-ir-scanner made up a gir xml like:
<class>
  <field name="is_key">
    <callback name="is_key">
from CamelPartitionTable is_key  callback field:
http://git.gnome.org/browse/evolution-data-server/tree/camel/camel-partition-table.h#n115
struct _CamelPartitionTable {
	CamelObject parent;
	CamelPartitionTablePrivate *priv;

	CamelBlockFile *blocks;
	camel_block_t rootid;

	gint (*is_key)(CamelPartitionTable *cpi, const gchar *key, camel_key_t keyid, gpointer data);
	gpointer is_key_data;

	/* we keep a list of partition blocks active at all times */
	CamelDList partition;
};


I was unable from available reference of the gir XML format to decipher whether callback in a class field is correct and g-ir-compiler is lacking. In doubt I made up this patch to add support to g-ir-compiler to add this support.
Comment 1 Simon Feltman 2014-02-27 21:58:51 UTC
Should have searched for this before submitting my own patch to bug 725198. In any event, the patch over there adds validation and fixes the repository API to take this change into account.

*** This bug has been marked as a duplicate of bug 725198 ***
Comment 2 André Klapper 2015-02-07 16:48:39 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]