diff Objects/stringobject.c @ 38294:41768de17ead legacy-trunk

needforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO C versions if they're not defined.
author Fredrik Lundh <fredrik@pythonware.com>
date Thu, 25 May 2006 16:10:12 +0000
parents e15b14c7fa14
children ae6bbf2f2a41
line wrap: on
line diff
--- a/Objects/stringobject.c	Thu May 25 15:53:30 2006 +0000
+++ b/Objects/stringobject.c	Thu May 25 16:10:12 2006 +0000
@@ -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)
 {