Re: Feature request: GType name without "gtkmm__CustomObject_"

Am Samstag, den 06.01.2007, 22:23 +0100 schrieb Oliver Nittka:
> Daniel Elstner wrote:
> > Am Samstag, den 06.01.2007, 17:42 +0100 schrieb Oliver Nittka:
> > Gladly accepted, unless Murray objects to this change.
> please be warned, however, that i may come up with the same wish
> concerning "glibmm__CustomBoxed_" and "glibmm__CustomPointer_", both in
> I've not yet investigated on how to use a
> Glib::Property<someenum> in glade, but they've already shown up as
> glibmm__CustomBoxed_someenum, so this may become an issue (or not).

Urgh, this is more likely to be a problem since these types could be
instantiated for POD types, too.  I just tried this:

    g_print("%s\n", typeid(GdkColor).name());

result: 9_GdkColor

A leading digit is not valid in a GType name.  At the very least, an
underscore prefix should be used.  Actually, this holds true for the
Glib::Object case as well, so we'd better not drop the prefix altogether
there too.  Seeing that mangling creates obscure names anyway, the
underscore is probably safe.  And on Windows the mangling even uses
non-alphanumeric characters, making it even more obscure due to the
large number of '+' characters after canonicalization.


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