| 37 | const char *cJSON_GetErrorPtr() { return ep; } |
| 38 | |
| 39 | static int cJSON_strcasecmp(const char *s1, const char *s2) { |
| 40 | if (!s1) return (s1 == s2) ? 0 : 1; |
| 41 | if (!s2) return 1; |
| 42 | for (; tolower(*s1) == tolower(*s2); ++s1, ++s2) |
| 43 | if (*s1 == 0) return 0; |
| 44 | return tolower(*(const unsigned char *)s1) - tolower(*(const unsigned char *)s2); |
| 45 | } |
| 46 | |
| 47 | static void *(*cJSON_malloc)(size_t sz) = malloc; |
| 48 | static void (*cJSON_free)(void *ptr) = free; |
no outgoing calls
no test coverage detected