From 9a0c54eb265435fe2b7f7107bcda2fbfc9cfd5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 20 Apr 2020 06:19:09 +0200 Subject: [PATCH] Rename linkhash -> json_c_linkhash This done for the same reasons as we do not ship config.h. --- CMakeLists.txt | 6 +++--- json.h | 2 +- linkhash.c => json_c_linkhash.c | 4 ++-- linkhash.h => json_c_linkhash.h | 10 +++++----- json_object.c | 2 +- json_visit.c | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) rename linkhash.c => json_c_linkhash.c (99%) rename linkhash.h => json_c_linkhash.h (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index aeb5916..fbc5164 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -294,7 +294,7 @@ if (NOT ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")) endif() if ($ENV{VALGRIND}) - # Build so that valgrind doesn't complain about linkhash.c + # Build so that valgrind doesn't complain about json_c_linkhash.c add_definitions(-DVALGRIND=1) endif() @@ -313,7 +313,7 @@ set(JSON_C_PUBLIC_HEADERS ${PROJECT_SOURCE_DIR}/json_types.h ${PROJECT_SOURCE_DIR}/json_util.h ${PROJECT_SOURCE_DIR}/json_visit.h - ${PROJECT_SOURCE_DIR}/linkhash.h + ${PROJECT_SOURCE_DIR}/json_c_linkhash.h ${PROJECT_SOURCE_DIR}/json_c_printbuf.h ) @@ -340,7 +340,7 @@ set(JSON_C_SOURCES ${PROJECT_SOURCE_DIR}/json_tokener.c ${PROJECT_SOURCE_DIR}/json_util.c ${PROJECT_SOURCE_DIR}/json_visit.c - ${PROJECT_SOURCE_DIR}/linkhash.c + ${PROJECT_SOURCE_DIR}/json_c_linkhash.c ${PROJECT_SOURCE_DIR}/json_c_printbuf.c ${PROJECT_SOURCE_DIR}/random_seed.c ${PROJECT_SOURCE_DIR}/strerror_override.c diff --git a/json.h b/json.h index 104daee..6228c9e 100644 --- a/json.h +++ b/json.h @@ -29,7 +29,7 @@ extern "C" { #include "json_pointer.h" #include "json_tokener.h" #include "json_util.h" -#include "linkhash.h" +#include "json_c_linkhash.h" #ifdef __cplusplus } diff --git a/linkhash.c b/json_c_linkhash.c similarity index 99% rename from linkhash.c rename to json_c_linkhash.c index 7ea58c0..f85038c 100644 --- a/linkhash.c +++ b/json_c_linkhash.c @@ -1,5 +1,5 @@ /* - * $Id: linkhash.c,v 1.4 2006/01/26 02:16:28 mclark Exp $ + * $Id: json_c_linkhash.c,v 1.4 2006/01/26 02:16:28 mclark Exp $ * * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. * Michael Clark @@ -28,7 +28,7 @@ #include /* Get InterlockedCompareExchange */ #endif -#include "linkhash.h" +#include "json_c_linkhash.h" #include "random_seed.h" /* hash functions */ diff --git a/linkhash.h b/json_c_linkhash.h similarity index 97% rename from linkhash.h rename to json_c_linkhash.h index 9377723..d8dbaaa 100644 --- a/linkhash.h +++ b/json_c_linkhash.h @@ -1,5 +1,5 @@ /* - * $Id: linkhash.h,v 1.6 2006/01/30 23:07:57 mclark Exp $ + * $Id: json_c_linkhash.h,v 1.6 2006/01/30 23:07:57 mclark Exp $ * * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. * Michael Clark @@ -16,8 +16,8 @@ * this is exposed by the json_object_get_object() function and within the * json_object_iter type, it is not recommended for direct use. */ -#ifndef _linkhash_h_ -#define _linkhash_h_ +#ifndef _json_c_linkhash_h_ +#define _json_c_linkhash_h_ #include "json_object.h" @@ -309,7 +309,7 @@ extern int lh_table_length(struct lh_table *t); int lh_table_resize(struct lh_table *t, int new_size); /** - * @deprecated Don't use this outside of linkhash.h: + * @deprecated Don't use this outside of json_c_linkhash.h: */ #if !defined(_MSC_VER) || (_MSC_VER > 1800) /* VS2010 can't handle inline funcs, so skip it there */ @@ -337,7 +337,7 @@ static _LH_INLINE unsigned long lh_get_hash(const struct lh_table *t, const void #undef _LH_INLINE /** - * @deprecated Don't use this outside of linkhash.h: + * @deprecated Don't use this outside of json_c_linkhash.h: */ #ifdef __UNCONST #define _LH_UNCONST(a) __UNCONST(a) diff --git a/json_object.c b/json_object.c index a50f735..52426ec 100644 --- a/json_object.c +++ b/json_object.c @@ -28,7 +28,7 @@ #include "json_object.h" #include "json_object_private.h" #include "json_util.h" -#include "linkhash.h" +#include "json_c_linkhash.h" #include "math_compat.h" #include "json_c_printbuf.h" #include "snprintf_compat.h" diff --git a/json_visit.c b/json_visit.c index fb16fa6..1c9acb8 100644 --- a/json_visit.c +++ b/json_visit.c @@ -11,7 +11,7 @@ #include "json_inttypes.h" #include "json_object.h" #include "json_visit.h" -#include "linkhash.h" +#include "json_c_linkhash.h" static int _json_c_visit(json_object *jso, json_object *parent_jso, const char *jso_key, size_t *jso_index, json_c_visit_userfunc *userfunc, void *userarg);