Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

type_util.h
1 /* type_util.h
2 * Types utility definitions
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11 #ifndef __TYPE_UTIL_H__
12 #define __TYPE_UTIL_H__
13
14 #include <glib.h>
15 #include "ws_symbol_export.h"
16
17 /*
18 * guint64 to gdouble conversions taken from gstutils.h of GStreamer project
19 *
20 * GStreamer
21 * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
22 * 2000 Wim Taymans <wtay@chello.be>
23 * 2002 Thomas Vander Stichele <thomas@apestaart.org>
24 *
25 * gstutils.h: Header for various utility functions
26 *
27 * GNU GPL v2
28 *
29 */
30
31 WS_DLL_PUBLIC
32 guint64 type_util_gdouble_to_guint64(gdouble value);
33 WS_DLL_PUBLIC
34 gdouble type_util_guint64_to_gdouble(guint64 value);
35
36 #ifdef _WIN32
37 #define gdouble_to_guint64(value) type_util_gdouble_to_guint64(value)
38 #define guint64_to_gdouble(value) type_util_guint64_to_gdouble(value)
39 #else
40 #define gdouble_to_guint64(value) ((guint64)(value))
41 #define guint64_to_gdouble(value) ((gdouble)(value))
42 #endif
43
44 #endif /* __TYPE_UTIL_H__ */