[Python-checkins] r46219 - python/trunk/Objects/stringobject.c
fredrik.lundh
python-checkins at python.org
Thu May 25 18:10:14 CEST 2006
Author: fredrik.lundh
Date: Thu May 25 18:10:12 2006
New Revision: 46219
Modified:
python/trunk/Objects/stringobject.c
Log:
needforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO C
versions if they're not defined.
Modified: python/trunk/Objects/stringobject.c
==============================================================================
--- python/trunk/Objects/stringobject.c (original)
+++ python/trunk/Objects/stringobject.c Thu May 25 18:10:12 2006
@@ -2033,6 +2033,11 @@
\n\
Return a copy of the string S converted to lowercase.");
+/* _tolower and _toupper are defined by SUSv2, but they're not ISO C */
+#ifndef _tolower
+#define _tolower tolower
+#endif
+
static PyObject *
string_lower(PyStringObject *self)
{
@@ -2062,6 +2067,10 @@
\n\
Return a copy of the string S converted to uppercase.");
+#ifndef _toupper
+#define _toupper toupper
+#endif
+
static PyObject *
string_upper(PyStringObject *self)
{
More information about the Python-checkins
mailing list