[Python-checkins] r82194 - python/branches/py3k/Include/pyctype.h
stefan.krah
python-checkins at python.org
Thu Jun 24 12:25:08 CEST 2010
Author: stefan.krah
Date: Thu Jun 24 12:25:08 2010
New Revision: 82194
Log:
Add specification for the Py_IS* macros in pyctype.h.
Modified:
python/branches/py3k/Include/pyctype.h
Modified: python/branches/py3k/Include/pyctype.h
==============================================================================
--- python/branches/py3k/Include/pyctype.h (original)
+++ python/branches/py3k/Include/pyctype.h Thu Jun 24 12:25:08 2010
@@ -11,6 +11,9 @@
extern const unsigned int _Py_ctype_table[256];
+/* Unlike their C counterparts, the following macros are not meant to
+ * handle an int with any of the values [EOF, 0-UCHAR_MAX]. The argument
+ * must be a signed/unsigned char. */
#define Py_ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER)
#define Py_ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_UPPER)
#define Py_ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALPHA)
More information about the Python-checkins
mailing list