Re: RFC: Operation Options API proposal



On 25/03/11 11:33, Iago Toral Quiroga wrote:

[...]

>>> If we have get/set_* then I think we do not really need a get/set_value
>>> and could go with a get/set_data that would receive and return a
>>> pointer. BTW, out of curiosity, do we have an example caps that could
>>> need this GValue/pointer API?
>>
>> I don't think that any specific cap would need that. My (vague)
>> understanding is that using GValues may ease the work of binding
>> writers, but not too sure. Is there a binding writer in the room?
> 
> Well, Simón worked on the GObject introspection support in Grilo, so
> maybe he can shed some light here, Simón?

I've just tested GValues from Python and JavaScript using GObject
Introspection. Python supported it without any issues. In JavaScript, it
seems to depend on the particular project using it. I tested from both
gjs [1] and seed [2], with the versions shipped by Ubuntu maverick
(didn't have time to check git master's version). While gjs didn't
support GValues, seed did (but there was a strange issue with GValues
appearing as holding doubles and ignoring any effort to make them hold
other data types. _Maybe_ that's fixed in upstream)

As for gpointers, I also think that they might be less
introspection/binding friendly. Have you considered GVariants [3]?

Best regards,

Simon

1. http://live.gnome.org/Gjs
2. http://live.gnome.org/Seed
3. http://library.gnome.org/devel/glib/stable/glib-GVariant.html

Attachment: signature.asc
Description: OpenPGP digital signature



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