Apache 1.3 API Documentation

Structure array_header

Definition:

typedef struct { 
    pool *pool; 
    int elt_size; 
    int nelts; 
    int nalloc; 
    char *elts; 
} array_header;
     

Usage example:

typedef struct item_t { 
    int length;
    char *string; 
} item_t;
    :
array_header *item_array1; 
item_t *item; 
    :
item_array1 = ap_make_array(p, 4, sizeof(item_t));
    :
item = ap_push_array(item_array1);
item->length = 1;
item->string = "a";
    :
item_t *list;
 
list = (item_t *) item_array1->elts;
for (i = 0; i < item_array1->nelts; ++i) {
    item = &list[i];
    fprintf(stderr, "Item %d: length=%d, string='%s'\n",
            i, item->length, item->string);
}
    
     

No documentation available.

See also:
ap_append_arrays, ap_array_cat, ap_copy_array, ap_copy_array_hdr, ap_make_array, ap_push_array

Previous: ap_wait_t Next: BUFF

Table of Contents (Routines, Structures, Data Cells, Constants)