Eric Blake <[email protected]> writes:

> On 11/25/2015 02:23 PM, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <[email protected]>
>> ---
>>  qobject/json-parser.c | 20 +++++++-------------
>>  1 file changed, 7 insertions(+), 13 deletions(-)
>> 
>
>>  
>> -    if (token_is_keyword(token, "true")) {
>> +    val = token_get_value(token);
>> +
>> +    if (!strcmp(val, "true")) {
>>          ret = QOBJECT(qbool_from_bool(true));
>> -    } else if (token_is_keyword(token, "false")) {
>> +    } else if (!strcmp(val, "false")) {
>>          ret = QOBJECT(qbool_from_bool(false));
>> -    } else if (token_is_keyword(token, "null")) {
>> +    } else if (!strcmp(val, "null")) {
>>          ret = qnull();
>>      } else {
>> -        parse_error(ctxt, token, "invalid keyword `%s'", 
>> token_get_value(token));
>> +        parse_error(ctxt, token, "invalid keyword '%s'", val);
>
> Yay - fewer `' in error messages.  (Great back in the day when fonts
> rendered them symmetrically, and still useful in m4; but lousy for
> pasting into shell code and in modern fonts)

Perhaps we can some day use the proper U+2018 (LEFT SINGLE QUOTATION
MARK) and U+2019 (RIGHT SINGLE QUOTATION MARK).

> Reviewed-by: Eric Blake <[email protected]>

Thanks!

Reply via email to