From d582d3ae5afdc5d42a972cdf4fee6b731f6fe539 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Wed, 6 Dec 2017 23:56:23 -0500 Subject: [PATCH] Undeprecate the array_list, lh_table and printbuf typedefs, but move each to the corresponding header files. --- arraylist.h | 1 + json_object.h | 16 +--------------- linkhash.h | 1 + printbuf.h | 1 + 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/arraylist.h b/arraylist.h index 2cac236..38603e8 100644 --- a/arraylist.h +++ b/arraylist.h @@ -33,6 +33,7 @@ struct array_list size_t size; array_list_free_fn *free_fn; }; +typedef struct array_list array_list; extern struct array_list* array_list_new(array_list_free_fn *free_fn); diff --git a/json_object.h b/json_object.h index 9d79859..283eb95 100644 --- a/json_object.h +++ b/json_object.h @@ -35,6 +35,7 @@ #include #include "json_inttypes.h" +#include "printbuf.h" #ifdef __cplusplus extern "C" { @@ -145,21 +146,6 @@ struct json_object_iter }; typedef struct json_object_iter json_object_iter; -/* forward structure definitions */ - -/** - * @deprecated Unused in json-c sources - */ -typedef struct printbuf printbuf; -/** - * @deprecated Unused in json-c sources - */ -typedef struct lh_table lh_table; -/** - * @deprecated Unused in json-c sources - */ -typedef struct array_list array_list; - typedef int json_bool; /** diff --git a/linkhash.h b/linkhash.h index 3c609b6..9c2f5c1 100644 --- a/linkhash.h +++ b/linkhash.h @@ -139,6 +139,7 @@ struct lh_table { lh_hash_fn *hash_fn; lh_equal_fn *equal_fn; }; +typedef struct lh_table lh_table; /** diff --git a/printbuf.h b/printbuf.h index 399cb07..567a6a0 100644 --- a/printbuf.h +++ b/printbuf.h @@ -32,6 +32,7 @@ struct printbuf { int bpos; int size; }; +typedef struct printbuf printbuf; extern struct printbuf* printbuf_new(void);