if(!jso) return NULL;
jso->_delete = &json_object_string_delete;
jso->_to_json_string = &json_object_string_to_json_string;
- jso->o.c_string.str = malloc(len);
+ jso->o.c_string.str = (char*)malloc(len);
memcpy(jso->o.c_string.str, (void *)s, len);
jso->o.c_string.len = len;
return jso;
+#include "config.h"
+
#include <stdio.h>
#include <string.h>
#include "json.h"
#include "parse_flags.h"
+#if !defined(HAVE_STRCASECMP) && defined(_MSC_VER)
+# define strcasecmp _stricmp
+#elif !defined(HAVE_STRCASECMP)
+# error You do not have strcasecmp on your system.
+#endif /* HAVE_STRNCASECMP */
+
static struct {
const char *arg;
int flag;
json_object * const *jso1, * const *jso2;
int i1, i2;
- jso1 = j1;
- jso2 = j2;
+ jso1 = (json_object* const*)j1;
+ jso2 = (json_object* const*)j2;
if (!*jso1 && !*jso2) {
return 0;
}