Questions about xdt-csource

Matthew Brush mbrush at
Mon Oct 17 01:43:28 CEST 2011

Hi All,

In Geany[1] we are working on converting the interface from Glade 2 
generated code to GtkBuilder/Glade 3 and I was thinking we could use 
xdt-csource or at least a similar technique.  I mentioned it to some of 
the Geany devs and they had a couple valid concerns I wanted to ask 
about here.

The first concern was that embedding such a long string literal into the 
source was not portable since the C90 and C99 standards only guarantee 
support for a maximum string literal length of 509[2] and 4095[3] 
characters, respectively.

The second concern was the extra memory used by having the string 
containing the XML data always stuck in memory, as opposed to having it 
read from a file and then freed immediately once the 
GtkBuilder/GtkUIManager has parsed it.

So I was wondering if anyone could comment on whether, given the above, 
it's still worth using xdt-csource to speed up startup time and simply 
distribution for a program like Geany.

Matthew Brush

[2] I don't have the C90 standard, just going from gcc docs
[3] Section - Translation Limits

More information about the Xfce4-dev mailing list