Some updates to make the code compatible with VC 9 (2008)

VC 9 doesn't support late variable declarations, and doesn't have inttypes
so we need some direct definitions of a couple of more types.
This commit is contained in:
John Arbash Meinel
2012-02-01 09:27:49 +01:00
parent faa535386a
commit 6a231e4b41
5 changed files with 18 additions and 7 deletions

View File

@@ -321,10 +321,13 @@ struct json_object* json_object_new_int(int32_t i)
int32_t json_object_get_int(struct json_object *jso)
{
int64_t cint64;
enum json_type o_type;
if(!jso) return 0;
enum json_type o_type = jso->o_type;
int64_t cint64 = jso->o.c_int64;
o_type = jso->o_type;
cint64 = jso->o.c_int64;
if (o_type == json_type_string)
{