Go to the source code of this file.
Classes | |
struct | PmDict_s |
Typedefs | |
typedef struct PmDict_s | PmDict_t |
typedef struct PmDict_s * | pPmDict_t |
Functions | |
PmReturn_t | dict_clear (pPmObj_t pdict) |
PmReturn_t | dict_getItem (pPmObj_t pdict, pPmObj_t pkey, pPmObj_t *r_pobj) |
PmReturn_t | dict_new (pPmObj_t *r_pdict) |
PmReturn_t | dict_setItem (pPmObj_t pdict, pPmObj_t pkey, pPmObj_t pval) |
PmReturn_t | dict_update (pPmObj_t pdestdict, pPmObj_t psourcedict) |
Dict object type header.
Dict
Contains ptr to two seglists, one for keys, the other for values; and a length, the number of key/value pairs.
PmReturn_t dict_clear | ( | pPmObj_t | pdict | ) |
Clears the contents of a dict. after this operation, the dict should in the same state as if it were just created using dict_new().
pdict | ptr to dict to clear. |
PmReturn_t dict_getItem | ( | pPmObj_t | pdict, | |
pPmObj_t | pkey, | |||
pPmObj_t * | r_pobj | |||
) |
PmReturn_t dict_new | ( | pPmObj_t * | r_pdict | ) |
PmReturn_t dict_setItem | ( | pPmObj_t | pdict, | |
pPmObj_t | pkey, | |||
pPmObj_t | pval | |||
) |
Sets a value in the dict using the given key.
If the dict already contains a matching key, the value is replaced; otherwise the new key,val pair is inserted at the front of the dict (for fast lookup). In the later case, the length of the dict is incremented.
pdict | ptr to dict in which (key,val) will go | |
pkey | ptr to key obj | |
pval | ptr to val obj |
PmReturn_t dict_update | ( | pPmObj_t | pdestdict, | |
pPmObj_t | psourcedict | |||
) |