Преглед изворни кода

cJSON_Utils: Add true/false

Max Bruckner пре 8 година
родитељ
комит
b73881a388
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      cJSON_Utils.c

+ 4 - 0
cJSON_Utils.c

@@ -30,6 +30,10 @@
 
 
 #include "cJSON_Utils.h"
 #include "cJSON_Utils.h"
 
 
+/* define our own boolean type */
+#define true ((cJSON_bool)1)
+#define false ((cJSON_bool)0)
+
 static unsigned char* cJSONUtils_strdup(const unsigned char* const string)
 static unsigned char* cJSONUtils_strdup(const unsigned char* const string)
 {
 {
     size_t length = 0;
     size_t length = 0;