Mercurial > hg > nginx-quic
diff src/core/ngx_hunk.h @ 155:46eb23d9471d
nginx-0.0.1-2003-10-22-20:38:26 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 22 Oct 2003 16:38:26 +0000 |
parents | eac26585476e |
children | e7e094d34162 |
line wrap: on
line diff
--- a/src/core/ngx_hunk.h +++ b/src/core/ngx_hunk.h @@ -99,31 +99,30 @@ ngx_hunk_t *ngx_create_temp_hunk(ngx_poo #define ngx_alloc_hunk(pool) ngx_palloc(pool, sizeof(ngx_hunk_t)) #define ngx_calloc_hunk(pool) ngx_pcalloc(pool, sizeof(ngx_hunk_t)) -#define ngx_alloc_chain_entry(pool) ngx_palloc(pool, sizeof(ngx_chain_t)) + +#define ngx_alloc_chain_link(pool) ngx_palloc(pool, sizeof(ngx_chain_t)) + -#define ngx_add_hunk_to_chain(chain, h, pool, error) \ +#define ngx_alloc_link_and_set_hunk(chain, h, pool, error) \ do { \ - ngx_test_null(chain, ngx_alloc_chain_entry(pool), error); \ + ngx_test_null(chain, ngx_alloc_chain_link(pool), error); \ chain->hunk = h; \ chain->next = NULL; \ } while (0); -#define ngx_alloc_ce_and_set_hunk ngx_add_hunk_to_chain + +#define ngx_chain_add_link(chain, last, cl) \ + if (chain) { \ + *last = cl; \ + } else { \ + chain = cl; \ + } \ + last = &cl->next -#define ngx_chain_add_ce(chain, last, ce) \ - if (chain) { \ - *last = ce; \ - } else { \ - chain = ce; \ - } \ - last = &ce->next - - -int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in); +int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in); void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, ngx_chain_t **out, ngx_hunk_tag_t tag); - #endif /* _NGX_HUNK_H_INCLUDED_ */