summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_clang.h
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2017-06-26 21:41:58 +0300
committerValentin Bartenev <vbart@nginx.com>2017-06-26 21:41:58 +0300
commitf86c80309885230df2960ef8e1db337f04b11926 (patch)
tree9a66939a017d8e11e5119b0df3d5f27812a10ff9 /src/nxt_clang.h
parent01517e37c1d2b09712a666b7b4870fc932e526a9 (diff)
downloadunit-f86c80309885230df2960ef8e1db337f04b11926.tar.gz
unit-f86c80309885230df2960ef8e1db337f04b11926.tar.bz2
Interface for mapping JSON configuration objects to C structures.
Diffstat (limited to 'src/nxt_clang.h')
-rw-r--r--src/nxt_clang.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_clang.h b/src/nxt_clang.h
index 09ccaf4c..b69dd6af 100644
--- a/src/nxt_clang.h
+++ b/src/nxt_clang.h
@@ -173,6 +173,10 @@ nxt_container_of(p, type, field) \
(type *) ((u_char *) (p) - offsetof(type, field))
+#define nxt_pointer_to(p, offset) \
+ ((void *) ((char *) (p) + (offset)))
+
+
#define nxt_value_at(type, p, offset) \
*(type *) ((u_char *) p + offset)