]>
Commit | Line | Data |
---|---|---|
4710c53d | 1 | #ifndef STRINGLIB_STRINGDEFS_H\r |
2 | #define STRINGLIB_STRINGDEFS_H\r | |
3 | \r | |
4 | /* this is sort of a hack. there's at least one place (formatting\r | |
5 | floats) where some stringlib code takes a different path if it's\r | |
6 | compiled as unicode. */\r | |
7 | #define STRINGLIB_IS_UNICODE 0\r | |
8 | \r | |
9 | #define STRINGLIB_OBJECT PyStringObject\r | |
10 | #define STRINGLIB_CHAR char\r | |
11 | #define STRINGLIB_TYPE_NAME "string"\r | |
12 | #define STRINGLIB_PARSE_CODE "S"\r | |
13 | #define STRINGLIB_EMPTY nullstring\r | |
14 | #define STRINGLIB_ISSPACE Py_ISSPACE\r | |
15 | #define STRINGLIB_ISLINEBREAK(x) ((x == '\n') || (x == '\r'))\r | |
16 | #define STRINGLIB_ISDECIMAL(x) ((x >= '0') && (x <= '9'))\r | |
17 | #define STRINGLIB_TODECIMAL(x) (STRINGLIB_ISDECIMAL(x) ? (x - '0') : -1)\r | |
18 | #define STRINGLIB_TOUPPER Py_TOUPPER\r | |
19 | #define STRINGLIB_TOLOWER Py_TOLOWER\r | |
20 | #define STRINGLIB_FILL memset\r | |
21 | #define STRINGLIB_STR PyString_AS_STRING\r | |
22 | #define STRINGLIB_LEN PyString_GET_SIZE\r | |
23 | #define STRINGLIB_NEW PyString_FromStringAndSize\r | |
24 | #define STRINGLIB_RESIZE _PyString_Resize\r | |
25 | #define STRINGLIB_CHECK PyString_Check\r | |
26 | #define STRINGLIB_CHECK_EXACT PyString_CheckExact\r | |
27 | #define STRINGLIB_TOSTR PyObject_Str\r | |
28 | #define STRINGLIB_GROUPING _PyString_InsertThousandsGrouping\r | |
29 | #define STRINGLIB_GROUPING_LOCALE _PyString_InsertThousandsGroupingLocale\r | |
30 | \r | |
31 | #define STRINGLIB_WANT_CONTAINS_OBJ 1\r | |
32 | \r | |
33 | #endif /* !STRINGLIB_STRINGDEFS_H */\r |