2007-08-25 04:26:07 +02:00
|
|
|
#ifndef STRINGLIB_UNICODEDEFS_H
|
|
|
|
#define STRINGLIB_UNICODEDEFS_H
|
|
|
|
|
|
|
|
/* this is sort of a hack. there's at least one place (formatting
|
|
|
|
floats) where some stringlib code takes a different path if it's
|
|
|
|
compiled as unicode. */
|
|
|
|
#define STRINGLIB_IS_UNICODE 1
|
|
|
|
|
2011-09-28 07:41:54 +02:00
|
|
|
#define FASTSEARCH fastsearch
|
|
|
|
#define STRINGLIB(F) stringlib_##F
|
2008-02-17 20:48:00 +01:00
|
|
|
#define STRINGLIB_OBJECT PyUnicodeObject
|
2011-10-11 23:22:22 +02:00
|
|
|
#define STRINGLIB_SIZEOF_CHAR Py_UNICODE_SIZE
|
2007-08-25 04:26:07 +02:00
|
|
|
#define STRINGLIB_CHAR Py_UNICODE
|
|
|
|
#define STRINGLIB_TYPE_NAME "unicode"
|
2007-09-01 12:56:01 +02:00
|
|
|
#define STRINGLIB_PARSE_CODE "U"
|
2007-08-25 04:26:07 +02:00
|
|
|
#define STRINGLIB_EMPTY unicode_empty
|
2010-01-13 09:07:53 +01:00
|
|
|
#define STRINGLIB_ISSPACE Py_UNICODE_ISSPACE
|
|
|
|
#define STRINGLIB_ISLINEBREAK BLOOM_LINEBREAK
|
2007-08-25 04:26:07 +02:00
|
|
|
#define STRINGLIB_ISDECIMAL Py_UNICODE_ISDECIMAL
|
|
|
|
#define STRINGLIB_TODECIMAL Py_UNICODE_TODECIMAL
|
|
|
|
#define STRINGLIB_STR PyUnicode_AS_UNICODE
|
|
|
|
#define STRINGLIB_LEN PyUnicode_GET_SIZE
|
|
|
|
#define STRINGLIB_NEW PyUnicode_FromUnicode
|
|
|
|
#define STRINGLIB_CHECK PyUnicode_Check
|
2009-11-30 02:01:42 +01:00
|
|
|
#define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact
|
2008-02-17 20:48:00 +01:00
|
|
|
|
2007-11-15 21:48:54 +01:00
|
|
|
#define STRINGLIB_TOSTR PyObject_Str
|
2008-06-11 20:37:52 +02:00
|
|
|
#define STRINGLIB_TOASCII PyObject_ASCII
|
2007-08-25 04:26:07 +02:00
|
|
|
|
2007-10-16 08:31:30 +02:00
|
|
|
#define STRINGLIB_WANT_CONTAINS_OBJ 1
|
|
|
|
|
2007-08-25 04:26:07 +02:00
|
|
|
#endif /* !STRINGLIB_UNICODEDEFS_H */
|