Re: g_value_ types ...



Can we back up here and get some context here about what you
want these types for?

I think all of these could be done with G_TYPE_BOXED - using
a new fundemental type is just a small efficiency win and
for a lot of things will be lost in the noise.

[
 Actually, I'm quite opposed to the idea of reserving type IDs, it's
 setting us up for pain, and if people really register their ideas, we
 could could easily run out of space in the registry; I think the right
 way to handle this is to simply have a g_type_register_fundemental().

 Yes, it's a tiny bit slower to use a global variable to store
 your fundemental type than a constant. I don't think
 this is worth worrying about
]


Regards,
                                        Owen

Michael Meeks <michael ximian com> writes:

> Hi Tim,
> 
> On Thu, 3 May 2001, Tim Janik wrote:
> > for corba that's probably usefull, though the implementation shouldn't
> > go into glib. 
>  
>         Sure :-) I'm just asking for some reserved type ids.
>  
> > i can just preserve a fundamental type id for you: G_TYPE_CORBA(_ANY)
> > that you can use for GValues, and the implementation for that then
> > comes with orbit or bonobo. you could however implement that as a  
> > BOXED type also. since i don't know too much about CORBA, i'd like to
> > hear owen's opinion on that (hope you don't mind me Cc-ing him).   
> 
>         Owen, can we beg some reserved type ids for a legacy CORBA base
> system ? ;-), perhaps in the spirt of greater scrutiny, etc. etc. I'll CC
> gtk-devel too - though this means I'll never notice the reply.
> 
> > G_VALUE_BONOBO_OBJECT doesn't make much sense though, from what i
> > know, you're deriving BONOBO_TYPE_OBJECT from G_TYPE_OBJECT already  
> > right? so you can use that in GValues right away (GValues figure it's
> > a G_TYPE_OBJECT and know how to handle that).
> 
>         Ok, well there are 3 things that might be useful for me:
>         
>         G_TYPE_CORBA_ANY - containing a pointer to an any [ of course ]
>         
>         G_TYPE_CORBA_OBJECT - containing a CORBA_Object reference, copy
>                 / free would use CORBA_Object_duplicate / release
>         
>         G_TYPE_BONOBO_OBJREF - also containing a CORBA_Object reference
>                 but in this case to a remote Bonobo_Unknown, copy / free
>                 would use Bonobo_Unknown_ref / unref etc.
> 
> > > Currently using a G_TYPE_POINTER for the GValues Martin has setup,
> > > but possibly this is less than optimal.
> > 
> > G_TYPE_POINTER can be considered a nuklear waepon against language
> > bindings ;)




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