summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-09-23 12:03:32 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-09-23 12:03:32 +0200
commit6f2c688d68f57dedede87e08e74d82ac18244fa0 (patch)
tree4381689a2fd2f77c45c7316e35acbe23416579ee
parentc8fc0897cdfff6393919030e24809e938ee5076f (diff)
downloadlibubox-6f2c688d68f57dedede87e08e74d82ac18244fa0.tar.gz
blobmsg_json: include json.h inside blobmsg_json.c instead of the public header file
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r--blobmsg_json.c6
-rw-r--r--blobmsg_json.h7
2 files changed, 8 insertions, 5 deletions
diff --git a/blobmsg_json.c b/blobmsg_json.c
index 5aa528b..ffde23d 100644
--- a/blobmsg_json.c
+++ b/blobmsg_json.c
@@ -17,6 +17,12 @@
#include "blobmsg.h"
#include "blobmsg_json.h"
+#ifdef JSONC
+ #include <json.h>
+#else
+ #include <json/json.h>
+#endif
+
bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
{
json_object_object_foreach(obj, key, val) {
diff --git a/blobmsg_json.h b/blobmsg_json.h
index e8036eb..5ea6f09 100644
--- a/blobmsg_json.h
+++ b/blobmsg_json.h
@@ -16,11 +16,8 @@
#ifndef __BLOBMSG_JSON_H
#define __BLOBMSG_JSON_H
-#ifdef JSONC
- #include <json.h>
-#else
- #include <json/json.h>
-#endif
+struct json_object;
+typedef struct json_object json_object;
#include <stdbool.h>
#include "blobmsg.h"