Jeff If I understand the STRING struct correctly, buflen is the physical allocation of the buffer, and bufused is the number of bytes actually used by the string; therefore the latter would be correct for key_hash?
Peter Gibbs EmKel Systems Index: key.c =================================================================== RCS file: /home/perlcvs/parrot/key.c,v retrieving revision 1.8 diff -c -r1.8 key.c *** key.c 8 Jan 2002 06:34:49 -0000 1.8 --- key.c 8 Jan 2002 15:40:55 -0000 *************** *** 93,99 **** static INTVAL key_hash(struct Parrot_Interp *interpreter, STRING* value) { char* buffptr = value->bufstart; ! INTVAL len = value->buflen; INTVAL hash = 5893; while(len--) { --- 93,99 ---- static INTVAL key_hash(struct Parrot_Interp *interpreter, STRING* value) { char* buffptr = value->bufstart; ! INTVAL len = value->bufused; INTVAL hash = 5893; while(len--) {