Przeglądaj źródła

More sensible cjson realloc strategy.

Bernd Meyer 9 lat temu
rodzic
commit
595509a7f3
2 zmienionych plików z 3 dodań i 0 usunięć
  1. 1 0
      app/cjson/strbuf.h
  2. 2 0
      app/include/user_config.h

+ 1 - 0
app/cjson/strbuf.h

@@ -24,6 +24,7 @@
 
 #include "c_stdlib.h"
 #include "c_stdarg.h"
+#include "user_config.h"
 
 /* Size: Total bytes allocated to *buf
  * Length: String length, excluding optional NULL terminator.

+ 2 - 0
app/include/user_config.h

@@ -68,4 +68,6 @@
 #define LED_LOW_COUNT_DEFAULT 0
 #endif
 
+#define STRBUF_DEFAULT_INCREMENT 32
+
 #endif	/* __USER_CONFIG_H__ */