Bug 617947 - glib-mkenums: add @valuenum@ support
authorRyan Lortie <desrt@desrt.ca>
Thu, 6 May 2010 19:19:58 +0000 (14:19 -0500)
committerRyan Lortie <desrt@desrt.ca>
Thu, 6 May 2010 19:21:39 +0000 (14:21 -0500)
commit47805f4e0cadf35bd6882d7e54374fead25637d2
treed3a0420e0fb9dcea6bc353ba60b7c0ba19c0770e
parent7aa71527e592d3c46d08a784cf061c79e61d11d8
Bug 617947 - glib-mkenums: add @valuenum@ support

Add a @valuenum@ substitution that outputs the integer value of a
particular enum value.  The value is determined by using (sandboxed)
perl to evaluate C expression.  If evaluation fails then glib-mkenums
dies loudly.  Evaluation is only enabled if '@valuenum@' appears in the
template file, so existing users will not be affected.
gobject/glib-mkenums.in