[cairo] Reducing .data

Jean-Baptiste Note jbnote at gmail.com
Mon Dec 18 00:42:11 PST 2006


Hello,

I guess you may already be aware of this, but...

A slightly more beautiful way (to my untrained eye) to do this is
explained in the DSO howto by Ulrich Drepper. See appendix B,
"Automatic handling of Arrays of String Pointers" in
http://people.redhat.com/drepper/dsohowto.pdf

You can slightly alter the logic to have a DSO and non-DSO version of
the code (for instance, for static libraries). The macros can even be
made a bit more generic so that you can do something like:

#define ARRAY_FILE "stringtab.h"
#define LOOKUP_NAME stringarrayname
#include "stringlookup.h"

And reuse the stinglookup file for every string array in the code.

JB


More information about the cairo mailing list