From 9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 19 Sep 2024 06:14:33 +0200 Subject: Merging upstream version 4.4.0. Signed-off-by: Daniel Baumann --- epan/fifo_string_cache.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'epan/fifo_string_cache.h') diff --git a/epan/fifo_string_cache.h b/epan/fifo_string_cache.h index 9f4fd407..09cb6150 100644 --- a/epan/fifo_string_cache.h +++ b/epan/fifo_string_cache.h @@ -11,7 +11,10 @@ #ifndef __FIFO_STRING_CACHE_H__ #define __FIFO_STRING_CACHE_H__ +#include + #include + #include "ws_symbol_export.h" #ifdef __cplusplus @@ -22,7 +25,7 @@ typedef struct { GHashTable *set; GSList *head; GSList *tail; - guint max_entries; + unsigned max_entries; } fifo_string_cache_t; // These functions are marked with WS_DLL_PUBLIC so they can be unit-tested @@ -33,7 +36,7 @@ typedef struct { // If string_free_func is NULL, then the caller owns the string data, and it is // the caller that is responsible for freeing the data. WS_DLL_PUBLIC void -fifo_string_cache_init(fifo_string_cache_t *fcache, guint max_entries, GDestroyNotify string_free_func); +fifo_string_cache_init(fifo_string_cache_t *fcache, unsigned max_entries, GDestroyNotify string_free_func); // Free all memory owned by the fifo_string_cache. Whether or not the // fifoe_string_cache owns the actual strings depends on whether a @@ -42,15 +45,15 @@ WS_DLL_PUBLIC void fifo_string_cache_free(fifo_string_cache_t *fcache); // Does the cache contain a specific string? -WS_DLL_PUBLIC gboolean -fifo_string_cache_contains(fifo_string_cache_t *fcache, const gchar *entry); +WS_DLL_PUBLIC bool +fifo_string_cache_contains(fifo_string_cache_t *fcache, const char *entry); // Insert a string. The return value indicates whether the string was already // in the cache before this function was called. If the string was newly // inserted, and max_entries is > 0, and inserting the string would have caused // max_entries to be exceeded, the oldest inserted key is removed (FIFO order). -WS_DLL_PUBLIC gboolean -fifo_string_cache_insert(fifo_string_cache_t *fcache, const gchar *entry); +WS_DLL_PUBLIC bool +fifo_string_cache_insert(fifo_string_cache_t *fcache, const char *entry); #ifdef __cplusplus } -- cgit v1.2.3