summaryrefslogtreecommitdiffstats
path: root/epan/fifo_string_cache.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /epan/fifo_string_cache.h
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/fifo_string_cache.h')
-rw-r--r--epan/fifo_string_cache.h15
1 files changed, 9 insertions, 6 deletions
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 <stdbool.h>
+
#include <glib.h>
+
#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
}