Mercurial > cpython-lru_cache-weakref
annotate Objects/stringlib/stringdefs.h @ 80661:94de77bd0b4b 2.7
Issue #16194: document imp.load_dynamic problems
when read several extension modules from the same binary object file.
| author | Andrew Svetlov <andrew.svetlov@gmail.com> |
|---|---|
| date | Thu, 29 Nov 2012 19:51:28 +0200 |
| parents | 66f1d4a4c799 |
| children |
| rev | line source |
|---|---|
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
1 #ifndef STRINGLIB_STRINGDEFS_H |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
2 #define STRINGLIB_STRINGDEFS_H |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
3 |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
4 /* this is sort of a hack. there's at least one place (formatting |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
5 floats) where some stringlib code takes a different path if it's |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
6 compiled as unicode. */ |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
7 #define STRINGLIB_IS_UNICODE 0 |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
8 |
|
47527
52294af4b663
This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents:
47294
diff
changeset
|
9 #define STRINGLIB_OBJECT PyStringObject |
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
10 #define STRINGLIB_CHAR char |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
11 #define STRINGLIB_TYPE_NAME "string" |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
12 #define STRINGLIB_PARSE_CODE "S" |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
13 #define STRINGLIB_EMPTY nullstring |
|
58288
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
14 #define STRINGLIB_ISSPACE Py_ISSPACE |
|
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
15 #define STRINGLIB_ISLINEBREAK(x) ((x == '\n') || (x == '\r')) |
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
16 #define STRINGLIB_ISDECIMAL(x) ((x >= '0') && (x <= '9')) |
|
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
17 #define STRINGLIB_TODECIMAL(x) (STRINGLIB_ISDECIMAL(x) ? (x - '0') : -1) |
|
53539
4bdd847b57c2
Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors.
Eric Smith <eric@trueblade.com>
parents:
53312
diff
changeset
|
18 #define STRINGLIB_TOUPPER Py_TOUPPER |
|
4bdd847b57c2
Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors.
Eric Smith <eric@trueblade.com>
parents:
53312
diff
changeset
|
19 #define STRINGLIB_TOLOWER Py_TOLOWER |
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
20 #define STRINGLIB_FILL memset |
|
47527
52294af4b663
This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents:
47294
diff
changeset
|
21 #define STRINGLIB_STR PyString_AS_STRING |
|
52294af4b663
This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents:
47294
diff
changeset
|
22 #define STRINGLIB_LEN PyString_GET_SIZE |
|
52294af4b663
This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents:
47294
diff
changeset
|
23 #define STRINGLIB_NEW PyString_FromStringAndSize |
|
52294af4b663
This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents:
47294
diff
changeset
|
24 #define STRINGLIB_RESIZE _PyString_Resize |
|
52294af4b663
This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents:
47294
diff
changeset
|
25 #define STRINGLIB_CHECK PyString_Check |
|
58288
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
26 #define STRINGLIB_CHECK_EXACT PyString_CheckExact |
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
27 #define STRINGLIB_TOSTR PyObject_Str |
|
47527
52294af4b663
This reverts r63675 based on the discussion in this thread:
Gregory P. Smith <greg@mad-scientist.com>
parents:
47294
diff
changeset
|
28 #define STRINGLIB_GROUPING _PyString_InsertThousandsGrouping |
|
53312
c5e0d9beebf9
Backport of some of the work in r71665 to trunk. This reworks much of
Eric Smith <eric@trueblade.com>
parents:
47527
diff
changeset
|
29 #define STRINGLIB_GROUPING_LOCALE _PyString_InsertThousandsGroupingLocale |
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
30 |
|
58288
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
31 #define STRINGLIB_WANT_CONTAINS_OBJ 1 |
|
66f1d4a4c799
Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
Antoine Pitrou <solipsis@pitrou.net>
parents:
58090
diff
changeset
|
32 |
|
45381
b7231bf6bfb7
Backport of PEP 3101, Advanced String Formatting, from py3k.
Eric Smith <eric@trueblade.com>
parents:
diff
changeset
|
33 #endif /* !STRINGLIB_STRINGDEFS_H */ |
