Apache 1.3 API Documentation

Routine ap_table_add

Definition:

void ap_table_add(table *t, const char *k, const char *val);
     

Usage example:

No examples available.
     

Adds a new value val to table t, associated with key key. Both the key and the value are copied into the table's pool using ap_pstrdup() and pointers to the copies used in the table. If both values are constants, such as literal strings, you should use ap_table_addn() instead.

A new table entry is always created, even if there are already one or more entries with the same key. To update an existing entry, or create it if it doesn't exist, use ap_table_set() (q.v.). Be aware, though, that ap_table_set() will delete all other entries with the same key.

If a table has multiple entries for a particular key, only the first will be returned by the direct lookup routines (e.g., ap_table_get()). The only way to access such duplicate entries is to traverse the table with ap_table_do().

See also:
ap_clear_table, ap_copy_table, ap_make_table, ap_overlay_tables, ap_table_addn, ap_table_do, ap_table_get, ap_table_merge, ap_table_mergen, ap_table_set, ap_table_setn, ap_table_unset, table

Previous: ap_sync_scoreboard_image Next: ap_table_addn

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