On Wed, 7 Nov 2007, Morten Welinder wrote:

>> nobody has to use this syntax. you can stick to the ever simple:
>>    g_assert (foo > bar);
>>
>> however if you want the value of 'foo' and 'bar' be printed out, instead
>> of just the value of (foo > bar) which would be 0 or 1, then there are
>> no other means than using something simialr to:
>>    g_assert_cmpfloat (foo, >, bar);
>
> No other way?  You just need to think outside the box^w^wcpp.  How
> about a pre-cpp filter that looks at the source code, finds the g_assert,
> and does a little creative rewriting?

how about that? bad.
we don't use a preprocessor like moc before cpp+cc. if we did,
GObject would look a million times different.
people are coding such a thing after the fact these days though,
look at vala to see how it looks like.

also, for some out of the box thinking, see:
   http://blogs.gnome.org/timj/2007/07/14/13072007-switch-on-strings-in-c-and-c/

> Morten

---
ciaoTJ
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to