Defines | |
#define | rxv_spin_sget(ctx, key) rxv_spin_string(rxv_spin_get((ctx),(key))) |
#define | rxv_spin_sset(ctx, key, val) rxv_spin_set((ctx),(key),rxv_spin_datum(rxv_spin_pool(ctx),(val),NULL)) |
#define | rxv_spin_del(ctx, key) rxv_spin_set((ctx),(key),NULL) |
Typedefs | |
typedef struct rxv_spin_ctx | rxv_spin_ctx_t |
Functions | |
apr_pool_t * | rxv_spin_pool (rxv_spin_ctx_t *ctx) |
apr_pool_t * | rxv_spin_ppool (rxv_spin_ctx_t *ctx) |
rxv_spin_data_t * | rxv_spin_data (rxv_spin_ctx_t *ctx) |
request_rec * | rxv_spin_r (rxv_spin_ctx_t *ctx) |
apreq_handle_t * | rxv_spin_req (rxv_spin_ctx_t *ctx) |
void * | rxv_spin_xget (rxv_spin_ctx_t *ctx) |
void * | rxv_spin_xset (rxv_spin_ctx_t *ctx, void *extra) |
rxv_spin_data_t * | rxv_spin_get (rxv_spin_ctx_t *ctx, const char *key) |
rxv_spin_data_t * | rxv_spin_set (rxv_spin_ctx_t *ctx, const char *key, rxv_spin_data_t *value) |
#define rxv_spin_sget | ( | ctx, | |||
key | ) | rxv_spin_string(rxv_spin_get((ctx),(key))) |
get a string from the context by converting from single
#define rxv_spin_sset | ( | ctx, | |||
key, | |||||
val | ) | rxv_spin_set((ctx),(key),rxv_spin_datum(rxv_spin_pool(ctx),(val),NULL)) |
set a string into context by converting to single
#define rxv_spin_del | ( | ctx, | |||
key | ) | rxv_spin_set((ctx),(key),NULL) |
delete a value from context
typedef struct rxv_spin_ctx rxv_spin_ctx_t |
context type
apr_pool_t* rxv_spin_pool | ( | rxv_spin_ctx_t * | ctx | ) |
Retrieve context specific pool.
ctx | Context |
rxv_spin_pool(ctx);
apr_pool_t* rxv_spin_ppool | ( | rxv_spin_ctx_t * | ctx | ) |
Retrieve process specific pool.
ctx | Context |
rxv_spin_ppool(ctx);
rxv_spin_data_t* rxv_spin_data | ( | rxv_spin_ctx_t * | ctx | ) |
Retrieve data from context.
ctx | Context |
rxv_spin_data(ctx);
request_rec* rxv_spin_r | ( | rxv_spin_ctx_t * | ctx | ) |
Retrieve Apache request from context.
ctx | Context |
rxv_spin_r(ctx);
apreq_handle_t* rxv_spin_req | ( | rxv_spin_ctx_t * | ctx | ) |
Retrieve parsed request from context.
ctx | Context |
rxv_spin_req(ctx);
void* rxv_spin_xget | ( | rxv_spin_ctx_t * | ctx | ) |
Retrieve extra data from the context.
ctx | Context |
rxv_spin_xget(ctx);
void* rxv_spin_xset | ( | rxv_spin_ctx_t * | ctx, | |
void * | extra | |||
) |
Set extra data into the context.
ctx | Context | |
extra | Pointer to extra data to set into the context |
rxv_spin_xset(ctx,somedata);
rxv_spin_data_t* rxv_spin_get | ( | rxv_spin_ctx_t * | ctx, | |
const char * | key | |||
) |
Retrieve data from the context.
ctx | Context | |
key | Unique key by which this data is identified |
rxv_spin_get(ctx,"result");
rxv_spin_data_t* rxv_spin_set | ( | rxv_spin_ctx_t * | ctx, | |
const char * | key, | |||
rxv_spin_data_t * | value | |||
) |
Place data into the context.
ctx | Context | |
key | Unique key by which this data is identified | |
value | The actual data |
rxv_spin_set(ctx,"result",result);
Do not put data allocated from the heap (with malloc(), calloc() and friends) into the context unless you set up cleanup functions that will free the allocated space. Although the context itself and the bucket brigade passed to Apache will be cleaned automatically (because it is allocated from the pool and/or has relevant cleanup functions), the heap storage space has to be freed explicitly. The safest option is to always use data allocated from the request pool.