Subject: bug#6303: Acknowledgement (23.2; Win32 Antialiased fonts)

From: Stefan Monnier <[email-masked]>
Date: Fri, 20 Aug 2010 23:58:21 +0200

> Another thing. This bit:

>            char *str = SYMBOLP (val) ? SDATA (SYMBOL_NAME (val)) : NULL;
>            if (INTEGERP (val)) str = XINT (val) != 0 ? "true" : "false";
>            if (str == NULL) str = "true";

> would perhaps be clearer as

> 	    char *str;

> 	    if (INTEGERP (val))
> 	      str = XINT (val) ? "true" : "false";
> 	    else if (SYMBOLP (val))
> 	      str = SDATA (SYMBOL_NAME (val));
> 	    else
> 	      str = "true";

Actually, I'd write it:

    char *str = (INTEGERP (val) ? (XINT (val) ? "true" : "false")
                 : SYMBOLP (val) ? SDATA (SYMBOL_NAME (val))
                 : "true")

-- Stefan "look'ma! no assignment!"