Switch to storing string form of error quarks

Instead of storing the name of the function to call to get the
error quark, store the string form of the error quark, which
we derive from the introspection binary during scanning.

Update EnumBlob and GIEnumInfo to include the new information.

This will allow determining a back-mapping from error quark
to error domain without having to dlsym() and call all the
known error quark functions.

Based on earlier patches from Owen Taylor and Maxim Ermilov.

https://bugzilla.gnome.org/show_bug.cgi?id=602516
This commit is contained in:
Dan Winship
2011-05-19 16:21:13 -04:00
parent f9ebb4e99d
commit 57554d4b2d
8 changed files with 104 additions and 17 deletions

View File

@@ -798,6 +798,8 @@ typedef struct {
* (will be a signed or unsigned integral type)
* @gtype_name: String name of the associated #GType
* @gtype_init: String naming the symbol which gets the runtime #GType
* @error_domain: String naming the #GError domain this enum is
* associated with
* @n_values: The lengths of the values arrays.
* @values: Describes the enum values.
*/
@@ -817,7 +819,7 @@ typedef struct {
guint16 n_values;
guint16 reserved2;
guint32 reserved3;
guint32 error_domain;
ValueBlob values[];
} EnumBlob;