TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags
[wireshark-sm.git] / wsutil / wmem / wmem_miscutl.h
blob1d9888784e6b29d78347a1d90f16ffbdf0a27f18
1 /** @file
2 * Definitions for the Wireshark Memory Manager Misc Utilities
3 * Copyright 2013, Evan Huus <eapache@gmail.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __WMEM_MISCUTL_H__
13 #define __WMEM_MISCUTL_H__
15 #include <string.h>
16 #include <glib.h>
18 #ifdef __cplusplus
19 extern "C" {
20 #endif /* __cplusplus */
22 /** @addtogroup wmem
23 * @{
24 * @defgroup wmem-strutl String Utilities
26 * A collection of misc. utility functions for wmem.
28 * @{
31 /** Copies a block of memory.
33 * @param allocator The allocator object to use to allocate memory to copy into.
34 * @param source The pointer to the memory block to copy.
35 * @param size The amount of memory to copy.
36 * @return The location of the memory copy or NULL if size is 0.
38 WS_DLL_PUBLIC
39 void *
40 wmem_memdup(wmem_allocator_t *allocator, const void *source, const size_t size)
41 G_GNUC_ALLOC_SIZE(3);
43 /** Generic GCompareFunc implementations to compare signed/unsigned integer
45 WS_DLL_PUBLIC
46 int
47 wmem_compare_int(const void *a, const void *b);
49 WS_DLL_PUBLIC
50 int
51 wmem_compare_uint(const void *a, const void *b);
53 /** @}
54 * @} */
56 #ifdef __cplusplus
58 #endif /* __cplusplus */
60 #endif /* __WMEM_MISCUTL_H__ */
63 * Editor modelines - https://www.wireshark.org/tools/modelines.html
65 * Local variables:
66 * c-basic-offset: 4
67 * tab-width: 8
68 * indent-tabs-mode: nil
69 * End:
71 * vi: set shiftwidth=4 tabstop=8 expandtab:
72 * :indentSize=4:tabSize=8:noTabs=true: