Skip to content

Commit

Permalink
fix cjson warning: "true" and "false redefined
Browse files Browse the repository at this point in the history
the similar change also exist in the offical git:
https://github.com/DaveGamble/cJSON

Part of #935.

Change-Id: I3d98de3ec893ccf0b0cab37acc2dbfef00d9e2b6
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
(cherry picked from commit 98c8683)
Signed-off-by: Bruce A. Mah <bmah@es.net>
  • Loading branch information
xiaoxiang781216 authored and bmah888 committed Jan 3, 2020
1 parent 6343986 commit 4e9a30b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@
#include "cjson.h"

/* define our own boolean type */
#ifdef true
#undef true
#endif
#define true ((cJSON_bool)1)

#ifdef false
#undef false
#endif
#define false ((cJSON_bool)0)

typedef struct {
Expand Down

0 comments on commit 4e9a30b

Please sign in to comment.