[svn:parrot] r46395 - branches/codestring/src/pmc
coke at svn.parrot.org
coke at svn.parrot.org
Fri May 7 19:55:31 UTC 2010
Author: coke
Date: Fri May 7 19:55:30 2010
New Revision: 46395
URL: https://trac.parrot.org/parrot/changeset/46395
Log:
move the hash invalidation to right after it happens. This should then cover
substr_str and other way to extract a STRING from our buffer.
Modified:
branches/codestring/src/pmc/stringbuilder.pmc
Modified: branches/codestring/src/pmc/stringbuilder.pmc
==============================================================================
--- branches/codestring/src/pmc/stringbuilder.pmc Fri May 7 16:40:26 2010 (r46394)
+++ branches/codestring/src/pmc/stringbuilder.pmc Fri May 7 19:55:30 2010 (r46395)
@@ -104,7 +104,6 @@
STRING *buffer, *retv;
GET_ATTR_buffer(INTERP, SELF, buffer);
retv = Parrot_str_clone(INTERP, buffer);
- retv->hashval = 0; /* hash is invalid */
return retv;
}
@@ -162,6 +161,7 @@
/* Update buffer */
buffer->bufused += s->bufused;
buffer->strlen += Parrot_str_length(INTERP, s);
+ buffer->hashval = 0; /* hash is invalid */
PARROT_ASSERT(buffer->bufused <= Buffer_buflen(buffer));
}
More information about the parrot-commits
mailing list