summaryrefslogtreecommitdiff
path: root/json_util.h
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2014-05-03 22:29:10 -0400
committerEric Haszlakiewicz <erh+git@nimenees.com>2014-05-04 22:33:26 -0400
commitd4e81f9ec8273914739808737fa0a27a3f0589fb (patch)
tree43c0763e296e9c763457fad9fd5b338ea36cfb35 /json_util.h
parent1da0599e0ebd60a5038c0a43345fdb249a5a3ea3 (diff)
downloadjson-c-d4e81f9ec8273914739808737fa0a27a3f0589fb.tar.gz
Move the json_min() and json_max() macros to json_util.h and mark everything else in bits.h deprecated.
Eliminate all uses of bits.h within the json-c code.
Diffstat (limited to 'json_util.h')
-rw-r--r--json_util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/json_util.h b/json_util.h
index 1005e58..387dbc4 100644
--- a/json_util.h
+++ b/json_util.h
@@ -14,6 +14,15 @@
#include "json_object.h"
+#ifndef json_min
+#define json_min(a,b) ((a) < (b) ? (a) : (b))
+#endif
+
+#ifndef json_max
+#define json_max(a,b) ((a) > (b) ? (a) : (b))
+#endif
+
+
#ifdef __cplusplus
extern "C" {
#endif