17 * 3 to compile. We should remove this once Python 3 support is fully |
17 * 3 to compile. We should remove this once Python 3 support is fully |
18 * supported and proper types are used in the extensions themselves. */ |
18 * supported and proper types are used in the extensions themselves. */ |
19 #define PyInt_Type PyLong_Type |
19 #define PyInt_Type PyLong_Type |
20 #define PyInt_FromLong PyLong_FromLong |
20 #define PyInt_FromLong PyLong_FromLong |
21 #define PyInt_AsLong PyLong_AsLong |
21 #define PyInt_AsLong PyLong_AsLong |
22 |
|
23 /* |
|
24 Mapping of some of the python < 2.x PyString* functions to py3k's PyUnicode. |
|
25 |
|
26 The commented names below represent those that are present in the PyBytes |
|
27 definitions for python < 2.6 (below in this file) that don't have a direct |
|
28 implementation. |
|
29 */ |
|
30 |
|
31 #define PyStringObject PyUnicodeObject |
|
32 #define PyString_Type PyUnicode_Type |
|
33 |
|
34 #define PyString_Check PyUnicode_Check |
|
35 #define PyString_CheckExact PyUnicode_CheckExact |
|
36 #define PyString_CHECK_INTERNED PyUnicode_CHECK_INTERNED |
|
37 #define PyString_AS_STRING PyUnicode_AsLatin1String |
|
38 #define PyString_GET_SIZE PyUnicode_GET_SIZE |
|
39 |
|
40 #define PyString_FromStringAndSize PyUnicode_FromStringAndSize |
|
41 #define PyString_FromString PyUnicode_FromString |
|
42 #define PyString_FromFormatV PyUnicode_FromFormatV |
|
43 #define PyString_FromFormat PyUnicode_FromFormat |
|
44 /* #define PyString_Size PyUnicode_GET_SIZE */ |
|
45 /* #define PyString_AsString */ |
|
46 /* #define PyString_Repr */ |
|
47 #define PyString_Concat PyUnicode_Concat |
|
48 #define PyString_ConcatAndDel PyUnicode_AppendAndDel |
|
49 #define _PyString_Resize PyUnicode_Resize |
|
50 /* #define _PyString_Eq */ |
|
51 #define PyString_Format PyUnicode_Format |
|
52 /* #define _PyString_FormatLong */ |
|
53 /* #define PyString_DecodeEscape */ |
|
54 #define _PyString_Join PyUnicode_Join |
|
55 #define PyString_Decode PyUnicode_Decode |
|
56 #define PyString_Encode PyUnicode_Encode |
|
57 #define PyString_AsEncodedObject PyUnicode_AsEncodedObject |
|
58 #define PyString_AsEncodedString PyUnicode_AsEncodedString |
|
59 #define PyString_AsDecodedObject PyUnicode_AsDecodedObject |
|
60 #define PyString_AsDecodedString PyUnicode_AsDecodedUnicode |
|
61 /* #define PyString_AsStringAndSize */ |
|
62 #define _PyString_InsertThousandsGrouping _PyUnicode_InsertThousandsGrouping |
|
63 |
22 |
64 #endif /* PY_MAJOR_VERSION */ |
23 #endif /* PY_MAJOR_VERSION */ |
65 |
24 |
66 typedef struct { |
25 typedef struct { |
67 PyObject_HEAD |
26 PyObject_HEAD |