From ce2b034ae9dcad49d8c2721494830c3731a60ff8 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 1 Dec 2008 03:14:37 +0000 Subject: Chunked arrays: Pack length of entries into array as a prefix to the data. Limit maximum length of data items stored in hash/chunked array to 2^16-1. svn path=/trunk/libparserutils/; revision=5858 --- src/utils/utils.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils/utils.h') diff --git a/src/utils/utils.h b/src/utils/utils.h index 2a61c2d..7f4e1a6 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -29,4 +29,8 @@ #define N_ELEMENTS(s) (sizeof((s)) / sizeof((s)[0])) #endif +#ifndef ALIGN +#define ALIGN(val) (((val) + 3) & ~(3)) +#endif + #endif -- cgit v1.2.1