• Andrew Dalke's avatar
    Fixed problem identified by Georg. The special-case in-place code for replace · 8c909107
    Andrew Dalke yazdı
    made a copy of the string using PyString_FromStringAndSize(s, n) and modify
    the copied string in-place.  However, 1 (and 0) character strings are shared
    from a cache.  This cause "A".replace("A", "a") to change the cached version
    of "A" -- used by everyone.
    
    Now may the copy with NULL as the string and do the memcpy manually.  I've
    added regression tests to check if this happens in the future.  Perhaps
    there should be a PyString_Copy for this case?
    8c909107
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...