-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompat.c
54 lines (41 loc) · 1.22 KB
/
compat.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* $Id$ */
/* ----------------------------------------------------------------------- *
*
* Copyright 2005-2009 Helmut Januschka - All Rights Reserved
* Contact: <[email protected]>, <[email protected]>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
* USA; either version 2 of the License, or (at your option) any later
* version; incorporated herein by reference.
*
* visit: www.bartlby.org for support
* ----------------------------------------------------------------------- */
/*
$Revision$
$HeadURL$
$Date$
$Author$
*/
/*
*/
#include "bartlby_agent.h"
#ifdef NEEDS_JSON_GET_EX
int json_object_object_get_ex(struct json_object* jso, const char *key, struct json_object **value) {
*value = json_object_object_get(jso, key);
if (*value != NULL)
return 1;
else
return 0;
}
#endif
#ifdef NEEDS_JSON_INT64
struct json_object* json_object_new_int64(int64_t i) {
return json_object_new_int(i);
}
int64_t json_object_get_int64(struct json_object *obj) {
return (int64_t)json_object_get_int(obj);
}
#endif