Make pool string->id operations properly length-aware
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 18 Sep 2012 03:01:43 +0000 (06:01 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 18 Sep 2012 03:11:37 +0000 (06:11 +0300)
commit4c75ab28b804e182bfd258b2caf54caf1e8e70be
tree3c810b2a832d1a9ad770708372e7f3abc75e073f
parent0927ab855e415a2823e1852d1497885e4903fad7
Make pool string->id operations properly length-aware

- Allow looking up and inserting partial key strings, this is useful
  in various cases where previously a local copy was needed for
  \0-terminating the key in the caller.
- Take advantage of rstrlenhash() in rpmstrPoolId(), previously the
  length was only interesting when adding so we wasted a strlen()
  on every call when the string was already in the pool.
rpmio/rpmstrpool.c