From 3568d5658492aa0ad70ca3abfb683b53978c0d88 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 23 Feb 2024 15:41:19 +0100 Subject: [PATCH] added type definition for hash table structure --- src/game_bd/bd_cave.c | 2 +- src/game_bd/bd_cavedb.c | 2 +- src/libgame/hash.h | 2 ++ src/tools.c | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/game_bd/bd_cave.c b/src/game_bd/bd_cave.c index cf7bc8af..30b9e766 100644 --- a/src/game_bd/bd_cave.c +++ b/src/game_bd/bd_cave.c @@ -81,7 +81,7 @@ static const char* scheduling_filename[] = "bd2ckatari" }; -static struct hashtable *name_to_element; +static HashTable *name_to_element; GdElement gd_char_to_element[256]; /* color of flashing the screen, gate opening to exit */ diff --git a/src/game_bd/bd_cavedb.c b/src/game_bd/bd_cavedb.c index 804cd06e..02b57e2d 100644 --- a/src/game_bd/bd_cavedb.c +++ b/src/game_bd/bd_cavedb.c @@ -930,7 +930,7 @@ GdElement gd_element_get_hammered(GdElement elem) void gd_cave_db_init(void) { int i; - struct hashtable *pointers; + HashTable *pointers; boolean lowercase_names = TRUE; /* TRANSLATORS: some languages (for example, german) do not have lowercase nouns. */ diff --git a/src/libgame/hash.h b/src/libgame/hash.h index 50806d44..61bc917a 100644 --- a/src/libgame/hash.h +++ b/src/libgame/hash.h @@ -121,6 +121,8 @@ struct hashtable_itr unsigned int index; }; +typedef struct hashtable HashTable; + /***************************************************************************** * create_hashtable_ext diff --git a/src/tools.c b/src/tools.c index 1d3607e4..2f3f06a1 100644 --- a/src/tools.c +++ b/src/tools.c @@ -11316,9 +11316,9 @@ static unsigned int test_uuid_random_function_better(int max) static void TestGeneratingUUIDs_RunTest(int nr, int always_seed, int num_uuids) { - struct hashtable *hash_seeds = + HashTable *hash_seeds = create_hashtable(get_hash_from_string, hash_key_strings_are_equal, free, NULL); - struct hashtable *hash_uuids = + HashTable *hash_uuids = create_hashtable(get_hash_from_string, hash_key_strings_are_equal, free, NULL); static char message[100]; int i; -- 2.34.1