Changes in dict.c [f271129:7869e48]
Legend:
- Unmodified
- Added
- Removed
-
dict.c
rf271129 r7869e48 1 /* Dictionary data abstraction. 1 /* Dictionary data abstraction. 2 2 * Maps from strings to pointers. 3 3 * Stores as a sorted list of key/value pairs. … … 68 68 } 69 69 70 /* Returns 0 on success. Will copy the key but make 71 a reference to the value. Will clobber an existing 70 /* Returns 0 on success. Will copy the key but make 71 a reference to the value. Will clobber an existing 72 72 entry with the same key iff delete_on_replace!=NULL, 73 73 and will run delete_on_replace on the old element. … … 93 93 if (pos!=d->size) { 94 94 /* shift forward to leave us a slot */ 95 memmove(d->els+pos+1, d->els+pos, 95 memmove(d->els+pos+1, d->els+pos, 96 96 sizeof(owl_dict_el)*(d->size-pos)); 97 97 } 98 98 d->size++; 99 99 d->els[pos].k = g_strdup(k); 100 d->els[pos].v = v; 100 d->els[pos].v = v; 101 101 return(0); 102 102 }
Note: See TracChangeset
for help on using the changeset viewer.