Mercurial > hg > nginx
view src/core/ngx_array.h @ 378:b7d3625c9336
nginx-0.0.7-2004-07-05-23:53:02 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 05 Jul 2004 19:53:02 +0000 |
parents | 87e73f067470 |
children | 3c56e834be46 |
line wrap: on
line source
#ifndef _NGX_ARRAY_H_INCLUDED_ #define _NGX_ARRAY_H_INCLUDED_ #include <ngx_config.h> #include <ngx_core.h> struct ngx_array_s { void *elts; ngx_uint_t nelts; size_t size; ngx_uint_t nalloc; ngx_pool_t *pool; }; ngx_array_t *ngx_create_array(ngx_pool_t *p, ngx_uint_t n, size_t size); 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_ */