Took me like 10 minutes to figure out how this snippet works. I decided I like it, but it was very confusing! Mostly because there's a macro named error and also a thread local named error. Also the macros err0r and err1r are pretty confusing names as well.
Is it possible to tidy those up a little? Just posting this up since I liked your snippet and will probably refer to it later :)
https://github.com/r-lyeh/tinybits/blob/master/tinyerror.c
Took me like 10 minutes to figure out how this snippet works. I decided I like it, but it was very confusing! Mostly because there's a macro named
error
and also a thread local namederror
. Also the macroserr0r
anderr1r
are pretty confusing names as well.Is it possible to tidy those up a little? Just posting this up since I liked your snippet and will probably refer to it later :)