blob: 86a480f1e3a7eda9a5251cbe26ccc1b28ae7e124 [file] [log] [blame]
Martin v. Löwisd63a3b82011-09-28 07:41:54 +02001/* this is sort of a hack. there's at least one place (formatting
2 floats) where some stringlib code takes a different path if it's
3 compiled as unicode. */
4#define STRINGLIB_IS_UNICODE 1
5
6#define FASTSEARCH ucs4lib_fastsearch
7#define STRINGLIB(F) ucs4lib_##F
8#define STRINGLIB_OBJECT PyUnicodeObject
Victor Stinner8cc70dc2011-10-11 23:22:22 +02009#define STRINGLIB_SIZEOF_CHAR 4
Antoine Pitrouca5f91b2012-05-10 16:36:02 +020010#define STRINGLIB_MAX_CHAR 0x10FFFFu
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020011#define STRINGLIB_CHAR Py_UCS4
12#define STRINGLIB_TYPE_NAME "unicode"
13#define STRINGLIB_PARSE_CODE "U"
14#define STRINGLIB_EMPTY unicode_empty
15#define STRINGLIB_ISSPACE Py_UNICODE_ISSPACE
16#define STRINGLIB_ISLINEBREAK BLOOM_LINEBREAK
17#define STRINGLIB_ISDECIMAL Py_UNICODE_ISDECIMAL
18#define STRINGLIB_TODECIMAL Py_UNICODE_TODECIMAL
Victor Stinnerd218bf12011-10-12 00:14:32 +020019#define STRINGLIB_STR PyUnicode_4BYTE_DATA
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020020#define STRINGLIB_LEN PyUnicode_GET_LENGTH
Victor Stinnere57b1c02011-09-28 22:20:48 +020021#define STRINGLIB_NEW _PyUnicode_FromUCS4
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020022#define STRINGLIB_CHECK PyUnicode_Check
23#define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020024
25#define STRINGLIB_TOSTR PyObject_Str
26#define STRINGLIB_TOASCII PyObject_ASCII
27
28#define _Py_InsertThousandsGrouping _PyUnicode_ucs4_InsertThousandsGrouping
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020029