aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_array.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-01-09 05:36:00 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-01-09 05:36:00 +0000
commit4e9393a0548d783cd6f50d1fcd003c85a24b2b16 (patch)
tree300b40876e7ea6c103b7a080e380cdaaaf31260e /src/core/ngx_array.h
parentc1817846d29be14903e40a0551f706ff50e09dcf (diff)
downloadnginx-4e9393a0548d783cd6f50d1fcd003c85a24b2b16.tar.gz
nginx-4e9393a0548d783cd6f50d1fcd003c85a24b2b16.zip
nginx-0.0.1-2003-01-09-08:36:00 import
Diffstat (limited to 'src/core/ngx_array.h')
-rw-r--r--src/core/ngx_array.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/ngx_array.h b/src/core/ngx_array.h
index d110b7688..22c7c4b0f 100644
--- a/src/core/ngx_array.h
+++ b/src/core/ngx_array.h
@@ -20,4 +20,9 @@ void ngx_destroy_array(ngx_array_t *a);
void *ngx_push_array(ngx_array_t *a);
+#define ngx_init_array(a, p, n, s, rc) \
+ ngx_test_null(a.elts, ngx_palloc(p, n * s), rc); \
+ a.nelts = 0; a.size = s; a.nalloc = n; a.pool = p;
+
+
#endif /* _NGX_ARRAY_H_INCLUDED_ */