[Python-checkins] CVS: python/dist/src/Modules stropmodule.c,2.79,2.80
Tim Peters
tim_one@users.sourceforge.net
Wed, 09 May 2001 17:59:47 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv31705/python/dist/src/Modules
Modified Files:
stropmodule.c
Log Message:
The strop module and test_strop.py believe replace() with a 0 count
means "replace everything". But the string module, string.replace()
amd test_string.py believe a 0 count means "replace nothing".
"Nothing" wins, strop loses.
Bugfix candidate.
Index: stropmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/stropmodule.c,v
retrieving revision 2.79
retrieving revision 2.80
diff -C2 -r2.79 -r2.80
*** stropmodule.c 2001/05/10 00:32:57 2.79
--- stropmodule.c 2001/05/10 00:59:45 2.80
***************
*** 1122,1126 ****
char *str, *pat,*sub,*new_s;
int len,pat_len,sub_len,out_len;
! int count = 0;
PyObject *new;
--- 1122,1126 ----
char *str, *pat,*sub,*new_s;
int len,pat_len,sub_len,out_len;
! int count = -1;
PyObject *new;