diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-12-01 03:14:37 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-12-01 03:14:37 +0000 |
commit | ce2b034ae9dcad49d8c2721494830c3731a60ff8 (patch) | |
tree | dc88943dc1614b0f9e7c080e605307d6863732ca /src/utils/utils.h | |
parent | da18d0ce1b4ea9231243e52b3e81a6a5b026b879 (diff) | |
download | libparserutils-ce2b034ae9dcad49d8c2721494830c3731a60ff8.tar.gz libparserutils-ce2b034ae9dcad49d8c2721494830c3731a60ff8.tar.bz2 |
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
Diffstat (limited to 'src/utils/utils.h')
-rw-r--r-- | src/utils/utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 |