[Python-checkins] CVS: python/dist/src/Objects unicodeobject.c,2.28,2.29
M.-A. Lemburg
python-dev@python.org
Wed, 28 Jun 2000 01:11:50 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv18141/Objects
Modified Files:
unicodeobject.c
Log Message:
Marc-Andre Lemburg <mal@lemburg.com>:
Better error message for "1 in unicodestring". Submitted
by Andrew Kuchling.
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.28
retrieving revision 2.29
diff -C2 -r2.28 -r2.29
*** unicodeobject.c 2000/06/18 22:25:22 2.28
--- unicodeobject.c 2000/06/28 08:11:47 2.29
***************
*** 2989,2994 ****
/* Coerce the two arguments */
v = (PyUnicodeObject *)PyUnicode_FromObject(element);
! if (v == NULL)
goto onError;
u = (PyUnicodeObject *)PyUnicode_FromObject(container);
if (u == NULL) {
--- 2989,2997 ----
/* Coerce the two arguments */
v = (PyUnicodeObject *)PyUnicode_FromObject(element);
! if (v == NULL) {
! PyErr_SetString(PyExc_TypeError,
! "'in <string>' requires character as left operand");
goto onError;
+ }
u = (PyUnicodeObject *)PyUnicode_FromObject(container);
if (u == NULL) {