summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorStefan Krah <stefan@bytereef.org>2010-06-24 10:27:19 (GMT)
committerStefan Krah <stefan@bytereef.org>2010-06-24 10:27:19 (GMT)
commit521ee5651cbcb013c5b8e1d1522f12873ac1fa00 (patch)
treedcd1872c8e2b486c63e1fd2b4a76f294aa3dfe30 /Include
parentf0ae4c48ddb3d8cf1f97b2bc3b5020e680aa2533 (diff)
downloadcpython-521ee5651cbcb013c5b8e1d1522f12873ac1fa00.zip
cpython-521ee5651cbcb013c5b8e1d1522f12873ac1fa00.tar.gz
cpython-521ee5651cbcb013c5b8e1d1522f12873ac1fa00.tar.bz2
Merged revisions 82194 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r82194 | stefan.krah | 2010-06-24 12:25:08 +0200 (Thu, 24 Jun 2010) | 3 lines Add specification for the Py_IS* macros in pyctype.h. ........
Diffstat (limited to 'Include')
-rw-r--r--Include/pyctype.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/pyctype.h b/Include/pyctype.h
index 0d211ec..c5cc614 100644
--- a/Include/pyctype.h
+++ b/Include/pyctype.h
@@ -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)