* Don't use this as a variable, so we can compile with a C++ compiler
* Add casts from void* to type of assignment when using malloc
* Add #ifdef __cplusplus guards to all of the headers
* Add typedefs for json_object, json_tokener, array_list, printbuf, lh_table
Michael Clark, <michael@metaparadigm.com>
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@33 327403b1-1117-474d-bef2-5cb71233fd97
diff --git a/json_object.c b/json_object.c
index 28ca102..6c20579 100644
--- a/json_object.c
+++ b/json_object.c
@@ -159,7 +159,9 @@
static struct json_object* json_object_new(enum json_type o_type)
{
- struct json_object *jso = calloc(sizeof(struct json_object), 1);
+ struct json_object *jso;
+
+ jso = (struct json_object*)calloc(sizeof(struct json_object), 1);
if(!jso) return NULL;
jso->o_type = o_type;
jso->_ref_count = 1;