42 self->pub.p = xctx->p;
43 self->initial_count = 5;
45 self->maximum_count = 0;
57 self->initial_count = 100;
58 self->maximum_count = 100;
61 self->initial_count * self->entry_size);
62 self->pub.top = (
afw_octet_t *)self->pub.first - self->entry_size;
64 (
self->entry_size *
self->initial_count);
72 afw_stack_internal_set_evaluation_stack(
83 self->pub.p = xctx->p;
89 self->initial_count * self->entry_size);
90 self->pub.top = (
afw_octet_t *)self->pub.first - self->entry_size;
92 (
self->entry_size *
self->initial_count);
109 if (create_subpool_pool) {
115 self->initial_count = initial_count;
116 self->entry_size = entry_size;
117 self->maximum_count = maximum_count;
118 self->create_subpool_pool = create_subpool_pool;
120 self->pub.first =
afw_pool_calloc(p, initial_count * entry_size, xctx);
121 self->pub.top = (
afw_octet_t *)self->pub.first - entry_size;
123 (entry_size * initial_count);
139 if (self->create_subpool_pool) {
162 *count = size /
self->entry_size;
166 memcpy((
void *)*ptr, instance->first, size);
189 if (self->maximum_count == 0) {
190 new_count = count * 2;
193 if (count >= self->maximum_count) {
196 new_count = count * 2;
197 if (new_count > self->maximum_count) {
198 new_count =
self->maximum_count;
204 memcpy(new_first, self->pub.first, self->entry_size * count);
205 self->pub.first = new_first;
207 (self->entry_size * count);
209 (self->entry_size * new_count);
AFW_DEFINE(const afw_object_t *)
#define AFW_DEFINE_INTERNAL(type)
Define an internal function for /src/afw/ source*.c files.
Adaptive Framework Core Internal.
struct afw_xctx_qualifier_stack_entry_s afw_xctx_qualifier_stack_entry_t
Typedef for xctx qualifier stack entry.
struct afw_xctx_evaluation_stack_entry_s afw_xctx_evaluation_stack_entry_t
struct afw_xctx_internal_qualifier_stack_s afw_xctx_qualifier_stack_t
Typedef for xctx qualifier stack.
struct afw_xctx_evaluation_stack_s afw_xctx_evaluation_stack_t
apr_size_t afw_size_t
size_t.
unsigned char afw_octet_t
8 bits (unsigned).
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
#define afw_pool_malloc(instance, size, xctx)
Call method malloc of interface afw_pool.
#define afw_pool_calloc(instance, size, xctx)
Call method calloc of interface afw_pool.
#define afw_pool_get_apr_pool(instance)
Call method get_apr_pool of interface afw_pool.
#define afw_pool_release(instance, xctx)
Call method release of interface afw_pool.
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
const afw_pool_t * afw_pool_create(const afw_pool_t *parent, afw_xctx_t *xctx)
Create a new pool.
afw_stack_internal_set_qualifier_stack(afw_xctx_t *xctx)
afw_stack_copy_impl(afw_stack_t *instance, afw_size_t *count, const void ***ptr, const afw_pool_t *p, afw_xctx_t *xctx)
Copy stack implementation.
afw_stack_create_impl(afw_size_t entry_size, afw_size_t initial_count, afw_size_t maximum_count, afw_boolean_t create_subpool_pool, const afw_pool_t *p, afw_xctx_t *xctx)
Create a stack implementation.
afw_stack_release_impl(afw_stack_t *instance, afw_xctx_t *xctx)
Release stack implementation.
afw_stack_extend_impl(afw_stack_t *instance, afw_xctx_t *xctx)
Extend stack implementation.
afw_size_t evaluation_stack_maximum_count
maximum_count used to create xctx's evaluation stack.
afw_size_t evaluation_stack_initial_count
initial_count used to create xctx's evaluation stack.
Interface afw_pool public struct.
Struct for afw_stack_t typedef.
Interface afw_xctx public struct.