Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • dict.c

    rf271129 r7869e48  
    1 /* Dictionary data abstraction. 
     1/* Dictionary data abstraction.
    22 * Maps from strings to pointers.
    33 * Stores as a sorted list of key/value pairs.
     
    6868}
    6969
    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
    7272   entry with the same key iff delete_on_replace!=NULL,
    7373   and will run delete_on_replace on the old element.
     
    9393    if (pos!=d->size) {
    9494      /* 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,
    9696              sizeof(owl_dict_el)*(d->size-pos));
    9797    }
    9898    d->size++;
    9999    d->els[pos].k = g_strdup(k);
    100     d->els[pos].v = v;   
     100    d->els[pos].v = v;
    101101    return(0);
    102102  }
Note: See TracChangeset for help on using the changeset viewer.