15#include "ws_symbol_export.h"
16#include "ws_attributes.h"
25#if !GLIB_CHECK_VERSION(2, 57, 1)
37g_hash_table_steal_extended (GHashTable *hash_table,
38 gconstpointer lookup_key,
40 gpointer *stolen_value)
43 if (g_hash_table_lookup_extended (hash_table, lookup_key, &key, &value))
46 stolen_value = &value;
48 g_hash_table_steal (hash_table, key);
52 if (stolen_key != NULL)
54 if (stolen_value != NULL)
63#if !GLIB_CHECK_VERSION(2, 60, 0)
65#define g_queue_clear_full queue_clear_full
77queue_clear_full (GQueue * queue, GDestroyNotify free_func)
81 while ((data = g_queue_pop_head (queue)) != NULL)
87#if !GLIB_CHECK_VERSION(2, 61, 2)
89typedef volatile gint gatomicrefcount;
119static inline gboolean
120g_array_binary_search (GArray *array,
123 guint *out_match_index)
125 gboolean result = FALSE;
126 GRealArray *_array = (GRealArray *) array;
127 guint left, middle, right;
130 g_return_val_if_fail (_array != NULL, FALSE);
133 if (G_LIKELY(_array->
len))
136 right = _array->
len - 1;
138 while (left <= right)
140 middle = left + (right - left) / 2;
150 else if ( middle > 0)
157 if (result && out_match_index != NULL)
158 *out_match_index = middle;
164#if !GLIB_CHECK_VERSION(2, 64, 0)
191static inline gpointer
192g_array_steal (GArray *array,
198 g_return_val_if_fail (array != NULL, NULL);
200 rarray = (GRealArray *) array;
223static inline gpointer *
224g_ptr_array_steal (GPtrArray *array,
227 GRealPtrArray *rarray;
230 g_return_val_if_fail (array != NULL, NULL);
232 rarray = (GRealPtrArray *) array;
238 rarray->pdata = NULL;
254static inline guint8 *g_byte_array_steal (GByteArray *array,
257 return (guint8 *) g_array_steal ((GArray *) array, len);
261#if !GLIB_CHECK_VERSION(2, 68, 0)
274g_memdup2(
const void *mem,
size_t byte_size)
278 if (mem && byte_size != 0) {
279 new_mem = g_malloc(byte_size);
280 memcpy(new_mem, mem, byte_size);
289#if !GLIB_CHECK_VERSION(2, 74, 0)
290#ifndef G_REGEX_DEFAULT
291#define G_REGEX_DEFAULT ((GRegexCompileFlags)0)
295#if !GLIB_CHECK_VERSION(2, 74, 0)
296#ifndef G_REGEX_MATCH_DEFAULT
297#define G_REGEX_MATCH_DEFAULT ((GRegexMatchFlags)0)
301#if !GLIB_CHECK_VERSION(2, 88, 0)
302#ifndef G_NSEC_PER_SEC
303#define G_NSEC_PER_SEC 1000000000
Internal implementation of GArray, holding the backing buffer and allocation metadata.
Definition glib-compat.h:95
guint len
Definition glib-compat.h:97
guint elt_size
Definition glib-compat.h:99
GDestroyNotify clear_func
Definition glib-compat.h:103
guint alloc
Definition glib-compat.h:98
guint zero_terminated
Definition glib-compat.h:100
gatomicrefcount ref_count
Definition glib-compat.h:102
guint8 * data
Definition glib-compat.h:96
guint clear
Definition glib-compat.h:101
Internal implementation of GPtrArray, holding the backing pointer buffer and allocation metadata.
Definition glib-compat.h:171
guint len
Definition glib-compat.h:173
GDestroyNotify element_free_func
Definition glib-compat.h:177
guint alloc
Definition glib-compat.h:174
gatomicrefcount ref_count
Definition glib-compat.h:175
gpointer * pdata
Definition glib-compat.h:172
guint8 null_terminated
Definition glib-compat.h:176
Represents a single decoded TCP segment extracted from a captured frame for graph analysis.
Definition tap-tcp-stream.h:56
int(* compare_func)(const void *a, const void *b)
Function pointer type for comparing two values.
Definition wmem_tree-int.h:106