2 * Types utility definitions
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
11 #ifndef __TYPE_UTIL_H__
12 #define __TYPE_UTIL_H__
15 #include "ws_symbol_export.h"
18 * uint64_t to double conversions taken from gstutils.h of GStreamer project
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>
25 * gstutils.h: Header for various utility functions
32 uint64_t type_util_double_to_uint64(double value
);
34 double type_util_uint64_to_double(uint64_t value
);
37 #define double_to_uint64(value) type_util_double_to_uint64(value)
38 #define uint64_to_double(value) type_util_uint64_to_double(value)
40 #define double_to_uint64(value) ((uint64_t)(value))
41 #define uint64_to_double(value) ((double)(value))
44 #endif /* __TYPE_UTIL_H__ */