diff options
| author | Eric Smith <eric@trueblade.com> | 2009-04-27 19:04:37 (GMT) | 
|---|---|---|
| committer | Eric Smith <eric@trueblade.com> | 2009-04-27 19:04:37 (GMT) | 
| commit | cac7af6863a997376bffe00ecf07a62c5618a5d9 (patch) | |
| tree | 625ae6ebde4f6027d49bb3d40b6955888527fb05 /Objects/stringlib/stringdefs.h | |
| parent | ec047e0725cf31f24eb5ed3c43e6da843deea83a (diff) | |
| download | cpython-cac7af6863a997376bffe00ecf07a62c5618a5d9.zip cpython-cac7af6863a997376bffe00ecf07a62c5618a5d9.tar.gz cpython-cac7af6863a997376bffe00ecf07a62c5618a5d9.tar.bz2  | |
Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors.
Diffstat (limited to 'Objects/stringlib/stringdefs.h')
| -rw-r--r-- | Objects/stringlib/stringdefs.h | 13 | 
1 files changed, 2 insertions, 11 deletions
diff --git a/Objects/stringlib/stringdefs.h b/Objects/stringlib/stringdefs.h index d08971a..f6d0b51 100644 --- a/Objects/stringlib/stringdefs.h +++ b/Objects/stringlib/stringdefs.h @@ -6,15 +6,6 @@     compiled as unicode. */  #define STRINGLIB_IS_UNICODE     0 -/* _tolower and _toupper are defined by SUSv2, but they're not ISO C */ -/* This needs to be cleaned up. See issue 5793. */ -#ifndef _tolower -#define _tolower tolower -#endif -#ifndef _toupper -#define _toupper toupper -#endif -  #define STRINGLIB_OBJECT         PyStringObject  #define STRINGLIB_CHAR           char  #define STRINGLIB_TYPE_NAME      "string" @@ -22,8 +13,8 @@  #define STRINGLIB_EMPTY          nullstring  #define STRINGLIB_ISDECIMAL(x)   ((x >= '0') && (x <= '9'))  #define STRINGLIB_TODECIMAL(x)   (STRINGLIB_ISDECIMAL(x) ? (x - '0') : -1) -#define STRINGLIB_TOUPPER(x)     _toupper(Py_CHARMASK(x)) -#define STRINGLIB_TOLOWER(x)     _tolower(Py_CHARMASK(x)) +#define STRINGLIB_TOUPPER        Py_TOUPPER +#define STRINGLIB_TOLOWER        Py_TOLOWER  #define STRINGLIB_FILL           memset  #define STRINGLIB_STR            PyString_AS_STRING  #define STRINGLIB_LEN            PyString_GET_SIZE  | 
