diff options
Diffstat (limited to 'src/core/ngx_array.h')
-rw-r--r-- | src/core/ngx_array.h | 5 |
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_ */ |