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__
20 #endif /* __cplusplus */
24 * @defgroup wmem-strutl String Utilities
26 * A collection of misc. utility functions for wmem.
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.
40 wmem_memdup(wmem_allocator_t
*allocator
, const void *source
, const size_t size
)
43 /** Generic GCompareFunc implementations to compare signed/unsigned integer
47 wmem_compare_int(const void *a
, const void *b
);
51 wmem_compare_uint(const void *a
, const void *b
);
58 #endif /* __cplusplus */
60 #endif /* __WMEM_MISCUTL_H__ */
63 * Editor modelines - https://www.wireshark.org/tools/modelines.html
68 * indent-tabs-mode: nil
71 * vi: set shiftwidth=4 tabstop=8 expandtab:
72 * :indentSize=4:tabSize=8:noTabs=true: