annotate Include/pyctype.h @ 79675:c0a2294de787 2.7

Issue #16199: Backport 2to3 typo fix from 3.2.
author Chris Jerdonek <chris.jerdonek@gmail.com>
date Thu, 11 Oct 2012 16:15:46 -0700
parents 504981afa007
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53545
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
1 #ifndef PYCTYPE_H
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
2 #define PYCTYPE_H
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
3
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
4 #define PY_CTF_LOWER 0x01
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
5 #define PY_CTF_UPPER 0x02
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
6 #define PY_CTF_ALPHA (PY_CTF_LOWER|PY_CTF_UPPER)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
7 #define PY_CTF_DIGIT 0x04
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
8 #define PY_CTF_ALNUM (PY_CTF_ALPHA|PY_CTF_DIGIT)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
9 #define PY_CTF_SPACE 0x08
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
10 #define PY_CTF_XDIGIT 0x10
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
11
72660
504981afa007 Try to fix linking failures under Windows
Antoine Pitrou <solipsis@pitrou.net>
parents: 62471
diff changeset
12 PyAPI_DATA(const unsigned int) _Py_ctype_table[256];
53545
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
13
62471
b17fcdd38a5b Issue #9020: The Py_IS* macros from pyctype.h should generally only be
Stefan Krah <stefan@bytereef.org>
parents: 53545
diff changeset
14 /* Unlike their C counterparts, the following macros are not meant to
b17fcdd38a5b Issue #9020: The Py_IS* macros from pyctype.h should generally only be
Stefan Krah <stefan@bytereef.org>
parents: 53545
diff changeset
15 * handle an int with any of the values [EOF, 0-UCHAR_MAX]. The argument
b17fcdd38a5b Issue #9020: The Py_IS* macros from pyctype.h should generally only be
Stefan Krah <stefan@bytereef.org>
parents: 53545
diff changeset
16 * must be a signed/unsigned char. */
53545
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
17 #define Py_ISLOWER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_LOWER)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
18 #define Py_ISUPPER(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_UPPER)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
19 #define Py_ISALPHA(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALPHA)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
20 #define Py_ISDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_DIGIT)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
21 #define Py_ISXDIGIT(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_XDIGIT)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
22 #define Py_ISALNUM(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_ALNUM)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
23 #define Py_ISSPACE(c) (_Py_ctype_table[Py_CHARMASK(c)] & PY_CTF_SPACE)
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
24
72660
504981afa007 Try to fix linking failures under Windows
Antoine Pitrou <solipsis@pitrou.net>
parents: 62471
diff changeset
25 PyAPI_DATA(const unsigned char) _Py_ctype_tolower[256];
504981afa007 Try to fix linking failures under Windows
Antoine Pitrou <solipsis@pitrou.net>
parents: 62471
diff changeset
26 PyAPI_DATA(const unsigned char) _Py_ctype_toupper[256];
53545
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
27
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
28 #define Py_TOLOWER(c) (_Py_ctype_tolower[Py_CHARMASK(c)])
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
29 #define Py_TOUPPER(c) (_Py_ctype_toupper[Py_CHARMASK(c)])
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
30
54279163389d Include files missed in r72044.
Eric Smith <eric@trueblade.com>
parents:
diff changeset
31 #endif /* !PYCTYPE_H */