• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef STRINGLIB_UNICODEDEFS_H
2 #define STRINGLIB_UNICODEDEFS_H
3 
4 /* this is sort of a hack.  there's at least one place (formatting
5    floats) where some stringlib code takes a different path if it's
6    compiled as unicode. */
7 #define STRINGLIB_IS_UNICODE     1
8 
9 #define FASTSEARCH               fastsearch
10 #define STRINGLIB(F)             stringlib_##F
11 #define STRINGLIB_OBJECT         PyUnicodeObject
12 #define STRINGLIB_SIZEOF_CHAR    Py_UNICODE_SIZE
13 #define STRINGLIB_CHAR           Py_UNICODE
14 #define STRINGLIB_TYPE_NAME      "unicode"
15 #define STRINGLIB_PARSE_CODE     "U"
16 #define STRINGLIB_EMPTY          unicode_empty
17 #define STRINGLIB_ISSPACE        Py_UNICODE_ISSPACE
18 #define STRINGLIB_ISLINEBREAK    BLOOM_LINEBREAK
19 #define STRINGLIB_ISDECIMAL      Py_UNICODE_ISDECIMAL
20 #define STRINGLIB_TODECIMAL      Py_UNICODE_TODECIMAL
21 #define STRINGLIB_STR            PyUnicode_AS_UNICODE
22 #define STRINGLIB_LEN            PyUnicode_GET_SIZE
23 #define STRINGLIB_NEW            PyUnicode_FromUnicode
24 #define STRINGLIB_CHECK          PyUnicode_Check
25 #define STRINGLIB_CHECK_EXACT    PyUnicode_CheckExact
26 
27 #define STRINGLIB_TOSTR          PyObject_Str
28 #define STRINGLIB_TOASCII        PyObject_ASCII
29 
30 #define STRINGLIB_WANT_CONTAINS_OBJ 1
31 
32 #endif /* !STRINGLIB_UNICODEDEFS_H */
33