On 04/13/2012 02:22 AM, Michal Suchanek wrote: > On 13 April 2012 03:09, Peter Hutterer <[email protected]> wrote: >> typedef union { >> uint32_t ui; >> int32_t i; >> char *c; >> const char *str; >> void *ptr; >> } log_param_t; >> >> /* Log a message using only signal safe functions. */ >> void >> LogMessageVerbSigSafe(MessageType type, int verb, const char *message, >> log_param_t* param) > ... >> Instead of varargs, the callers need to supply a log_param_t array, which is >> painful, but hopefully better than splitting log messages over several >> commands. >> > I don't think you can initialize an array of log_param_t sanely in > standard C. Unless you are going to have gcc as hard dependency this > is probably going to be more painful than just using multiple > statements.
I think we're well beyond "sane" approaches :). I do have something cooking, though, that will hide everything behind variadic macros! -- Chase _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
