diff options
author | Valentin Bartenev <vbart@nginx.com> | 2018-06-25 16:51:47 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2018-06-25 16:51:47 +0300 |
commit | 1a52d876f7e10d07f58deee6faeaf70a11a6110f (patch) | |
tree | f69ba903180b3deac3bba2ee7acda9d34f18d73c /src/nxt_clang.h | |
parent | af31012815e20f0c92ed6ea803638a16ba47b0c2 (diff) | |
download | unit-1a52d876f7e10d07f58deee6faeaf70a11a6110f.tar.gz unit-1a52d876f7e10d07f58deee6faeaf70a11a6110f.tar.bz2 |
Introduced nxt_length() macro.
Diffstat (limited to 'src/nxt_clang.h')
-rw-r--r-- | src/nxt_clang.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_clang.h b/src/nxt_clang.h index a9b8cd9e..a10de08a 100644 --- a/src/nxt_clang.h +++ b/src/nxt_clang.h @@ -262,4 +262,8 @@ nxt_trunc_ptr(p, a) \ (u_char *) ((uintptr_t) (p) & ~((uintptr_t) (a) - 1)) +#define nxt_length(s) \ + (sizeof(s) - 1) + + #endif /* _NXT_CLANG_H_INCLUDED_ */ |