aboutsummaryrefslogtreecommitdiff
path: root/src/core/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/defs.h')
-rw-r--r--src/core/defs.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/defs.h b/src/core/defs.h
index 1c44e9af..5db68c1c 100644
--- a/src/core/defs.h
+++ b/src/core/defs.h
@@ -72,8 +72,10 @@ typedef struct {
#define NNI_SECOND (1000000)
// Structure allocation conveniences.
-#define NNI_ALLOC_STRUCT(s) nni_alloc(sizeof (*s))
-#define NNI_FREE_STRUCT(s) nni_free((s), sizeof (*s))
+#define NNI_ALLOC_STRUCT(s) nni_alloc(sizeof (*s))
+#define NNI_FREE_STRUCT(s) nni_free((s), sizeof (*s))
+#define NNI_ALLOC_STRUCTS(s, n) nni_alloc(sizeof (*s) * n)
+#define NNI_FREE_STRUCTS(s, n) nni_free(s, sizeof (*s) * n)
#define NNI_PUT16(ptr, u) \
do { \