Re: [PATCH 3/6] core: made plugin registry handle itself key =?UTF-8?Q?id=09assignments?=




On Thu, 12 May 2011 14:13:34 +0200, Guillaume Emont <guijemont igalia com> wrote:
On 12/05/2011 12:25, Iago Toral Quiroga wrote:
El mié, 11-05-2011 a las 20:31 +0200, Guillaume Emont escribió:
Instead of relying on GQuarks, a similar mechanism is implemented in the plugin registry. This gives more flexibility and allows to #define the values of core keys, which automatically give their symbols in GObject-introspection bindings.

Not sure I follow this properly, can you elaborate on the benefits we
obtain with this solution for the introspection based bindings?

In a nutshell, that is the simplest solution I found to have symbols of the type Grl.METADATA_KEY_FOO available in bindings: for that, we need to have the GRL_METADATA_KEY_FOO values #define'd to constants, else the GI scanner won't know how to handle them, and they won't appear in bindings.
If we were to use GQuarks, then the GRL_METADATA_KEY_FOO identifiers
need to either be global variables, or stuff like:
#define GRL_METADATA_KEY_FOO g_quark_from_string("foobar)
In both cases, they won't be visible in GI bindings.

Aha, I see. Thanks for explaining.

Iago


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]