From 02beb90db3734263c424fe208cdfae0a8405d640 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Thu, 3 Jan 2013 10:45:38 +0200 Subject: [PATCH] Make it possible to forward declare struct json_t This allows e.g. to use json_t in a header file that doesn't include jansson.h: struct json_t; typedef struct json_t json_t; json_t *foo(json_t *bar); --- src/jansson.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jansson.h b/src/jansson.h index 352c6ce..54e7e53 100644 --- a/src/jansson.h +++ b/src/jansson.h @@ -47,7 +47,7 @@ typedef enum { JSON_NULL } json_type; -typedef struct { +typedef struct json_t { json_type type; size_t refcount; } json_t;