aboutsummaryrefslogtreecommitdiffstats
path: root/src/stack.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-04-13 18:47:36 +0100
committerDavid Robillard <d@drobilla.net>2020-06-21 18:12:04 +0200
commit5ab74d90a99cc72d9c0ffa3deae7779ff86c518b (patch)
tree6ddb4dbb2a4a800d9dbf14fa279fe1581a4925c4 /src/stack.h
parentc9c50ba84127d31e71d61c7ad92e2166e9079dff (diff)
downloadserd-5ab74d90a99cc72d9c0ffa3deae7779ff86c518b.tar.gz
serd-5ab74d90a99cc72d9c0ffa3deae7779ff86c518b.tar.bz2
serd-5ab74d90a99cc72d9c0ffa3deae7779ff86c518b.zip
Fix node alignment on 32-bit ARM
Diffstat (limited to 'src/stack.h')
-rw-r--r--src/stack.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stack.h b/src/stack.h
index 1460e0c2..1a5b7136 100644
--- a/src/stack.h
+++ b/src/stack.h
@@ -17,6 +17,8 @@
#ifndef SERD_STACK_H
#define SERD_STACK_H
+#include "system.h"
+
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
@@ -38,7 +40,7 @@ static inline SerdStack
serd_stack_new(size_t size)
{
SerdStack stack;
- stack.buf = (char*)calloc(size, 1);
+ stack.buf = (char*)serd_calloc_aligned(size, sizeof(SerdNode));
stack.buf_size = size;
stack.size = SERD_STACK_BOTTOM;
return stack;