Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 12025:7994d9db7f4d legacy-trunk
On 17-Mar-2000, Marc-Andre Lemburg said:
Attached you find an update of the Unicode implementation.
The patch is against the current CVS version. I would appreciate
if someone with CVS checkin permissions could check the changes
in.
The patch contains all bugs and patches sent this week and also
fixes a leak in the codecs code and a bug in the free list code
for Unicode objects (which only shows up when compiling Python
with Py_DEBUG; thanks to MarkH for spotting this one).
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Mon, 20 Mar 2000 16:36:48 +0000 |
| parents | f94d10b6d0f4 |
| children | 4f5671a31347 |
line wrap: on
line diff
--- a/Objects/stringobject.c Mon Mar 20 16:09:09 2000 +0000 +++ b/Objects/stringobject.c Mon Mar 20 16:36:48 2000 +0000 @@ -1395,7 +1395,7 @@ strstr replacement for arbitrary blocks of memory. - Locates the first occurance in the memory pointed to by MEM of the + Locates the first occurrence in the memory pointed to by MEM of the contents of memory pointed to by PAT. Returns the index into MEM if found, or -1 if not found. If len of PAT is greater than length of MEM, the function returns -1. @@ -1578,7 +1578,7 @@ return NULL; if (sub_len <= 0) { - PyErr_SetString(PyExc_ValueError, "empty replacement string"); + PyErr_SetString(PyExc_ValueError, "empty pattern string"); return NULL; } new_s = mymemreplace(str,len,sub,sub_len,repl,repl_len,count,&out_len);
