diff options
author | John Arbash Meinel <john@arbash-meinel.com> | 2012-02-01 09:27:49 +0100 |
---|---|---|
committer | John Arbash Meinel <john@arbash-meinel.com> | 2012-02-01 09:27:49 +0100 |
commit | 6a231e4b414bc0fde02b4b6a66929302bd8ce6f6 (patch) | |
tree | 99b9f85f6d56bc007e534e86865a1780fc0db09a /json_object.c | |
parent | faa535386a0c0a984caa4cc522d0cf70c97bc68f (diff) |
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.
Diffstat (limited to 'json_object.c')
-rw-r--r-- | json_object.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/json_object.c b/json_object.c index bc09d65..65c1f6c 100644 --- a/json_object.c +++ b/json_object.c @@ -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) { |