[cairo] Adding to_string() functions for all enums.

Michael Sweet mike at easysw.com
Tue Nov 21 03:16:57 PST 2006


Behdad Esfahbod wrote:
> Hi,
> 
> While working on the cairocairo probe (a tool to output cairo calls an
> app makes), I figured it should be useful for bindings of all kinds to
> have to_string() functions for all cairo enum types.  One that prints
> out the name of the enum value.  The problem is, we already have
> cairo_status_to_string() that unfortunately /describes/ the error, not
> just writing out the status name.  So, at least for that one the name
> to_string() cannot be used.  Suggestions on alternate names?  Unless
> someone beats me, I'm going to do the grunge work of adding all 20 soon:

to_keyword() or to_name() would be appropriate, and would leave open
other to_string() functions for human-readable conversions as needed.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com


More information about the cairo mailing list