[Python-checkins] CVS: python/dist/src/Python getargs.c,2.33.2.1,2.33.2.2
Guido van Rossum
python-dev@python.org
Fri, 4 Aug 2000 08:35:38 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory slayer.i.sourceforge.net:/tmp/cvs-serv9274/Python
Modified Files:
Tag: cnri-16-start
getargs.c
Log Message:
Reapply Marc-Andres patest patch in the 1.6 branch
Index: getargs.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v
retrieving revision 2.33.2.1
retrieving revision 2.33.2.2
diff -C2 -r2.33.2.1 -r2.33.2.2
*** getargs.c 2000/08/03 16:50:35 2.33.2.1
--- getargs.c 2000/08/04 15:35:36 2.33.2.2
***************
*** 416,420 ****
/* Internal API needed by convertsimple1(): */
extern
! PyObject *_PyUnicode_AsUTF8String(PyObject *unicode,
const char *errors);
--- 416,420 ----
/* Internal API needed by convertsimple1(): */
extern
! PyObject *_PyUnicode_AsDefaultEncodedString(PyObject *unicode,
const char *errors);
***************
*** 594,598 ****
*p = PyString_AS_STRING(arg);
else if (PyUnicode_Check(arg)) {
! arg = _PyUnicode_AsUTF8String(arg, NULL);
if (arg == NULL)
return "unicode conversion error";
--- 594,599 ----
*p = PyString_AS_STRING(arg);
else if (PyUnicode_Check(arg)) {
! arg = _PyUnicode_AsDefaultEncodedString(
! arg, NULL);
if (arg == NULL)
return "unicode conversion error";
***************
*** 639,643 ****
*p = PyString_AsString(arg);
else if (PyUnicode_Check(arg)) {
! arg = _PyUnicode_AsUTF8String(arg, NULL);
if (arg == NULL)
return "unicode conversion error";
--- 640,645 ----
*p = PyString_AsString(arg);
else if (PyUnicode_Check(arg)) {
! arg = _PyUnicode_AsDefaultEncodedString(
! arg, NULL);
if (arg == NULL)
return "unicode conversion error";
***************
*** 671,675 ****
encoding = (const char *)va_arg(*p_va, const char *);
if (encoding == NULL)
! return "(encoding is NULL)";
/* Get 's' parameter: the output buffer to use */
--- 673,677 ----
encoding = (const char *)va_arg(*p_va, const char *);
if (encoding == NULL)
! encoding = PyUnicode_GetDefaultEncoding();
/* Get 's' parameter: the output buffer to use */