aboutsummaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/node.c b/src/node.c
index e435093e..b7bbfd1c 100644
--- a/src/node.c
+++ b/src/node.c
@@ -1,12 +1,10 @@
// Copyright 2011-2023 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
-#include "node.h"
-
#include "base64.h"
#include "string_utils.h"
-#include "serd/serd.h"
+#include <serd/serd.h>
#include <assert.h>
#include <float.h>
@@ -17,14 +15,11 @@
#include <stdlib.h>
#include <string.h>
-#ifdef _WIN32
-# ifndef isnan
-# define isnan(x) _isnan(x)
-# endif
-# ifndef isinf
-# define isinf(x) (!_finite(x))
-# endif
-#endif
+struct SerdNodeImpl {
+ size_t n_bytes; /**< Size in bytes (not including null) */
+ SerdNodeFlags flags; /**< Node flags (e.g. string properties) */
+ SerdType type; /**< Node type */
+};
static size_t
serd_uri_string_length(const SerdURI* const uri)
@@ -297,7 +292,7 @@ serd_node_new_decimal(const double d, const unsigned frac_digits)
char* t = s - 1;
uint64_t dec = (uint64_t)int_part;
do {
- *t-- = (char)('0' + dec % 10);
+ *t-- = (char)('0' + (dec % 10));
} while ((dec /= 10) > 0);
*s++ = '.';