18 #define AFW_IMPLEMENTATION_ID "memory"
49 self->pub.inf = &impl_afw_object_associative_array_inf;
51 self->reference_count = 1;
63 impl_afw_object_associative_array_release (
78 for (hi = apr_hash_first(
81 hi = apr_hash_next(hi))
83 apr_hash_this(hi, &key, &klen, (
void **)&
object);
97 impl_afw_object_associative_array_add_reference (
111 impl_release_object(
void *data,
void *data2,
122 impl_afw_object_associative_array_get (
134 object = apr_hash_get(self->objects, key->s, key->len);
143 impl_release_object, xctx);
156 impl_afw_object_associative_array_get_reference (
168 object = apr_hash_get(self->objects, key->s, key->len);
202 impl_afw_object_associative_array_set (
215 existing = apr_hash_get(self->objects, key->s, key->len);
226 apr_hash_set(self->objects, key->s, key->len,
object);
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
Interface afw_interface implementation declares.
afw_integer_t afw_atomic_integer_decrement(AFW_ATOMIC afw_integer_t *mem)
Integer atomic decrement.
afw_integer_t afw_atomic_integer_increment(AFW_ATOMIC afw_integer_t *mem)
Integer atomic increment.
afw_boolean_t(* afw_object_cb_t)(const afw_object_t *object, void *context, afw_xctx_t *xctx)
Typedef for afw_adaptor_session_object callback.
apr_int64_t afw_integer_t
typedef for big signed int.
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
void impl_afw_object_associative_array_for_each(const afw_object_associative_array_t *instance, void *context, afw_object_cb_t cb, afw_xctx_t *xctx)
#define afw_object_add_reference(instance, xctx)
Call method add_reference of interface afw_object.
#define afw_object_release(instance, xctx)
Call method release of interface afw_object.
afw_object_memory_associative_array_create(const afw_pool_t *p, afw_xctx_t *xctx)
Create memory object associative array.
#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_register_cleanup_before(instance, data, data2, cleanup, xctx)
Call method register_cleanup_before 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.
Interface afw_object_associative_array public struct.
Interface afw_object public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Interface afw_xctx public struct.