Mercurial > vim
comparison src/if_python3.c @ 5112:f063be86b632 v7.3.1299
updated for version 7.3.1299
Problem: Errors when doing "make proto". Didn't do "make depend" for a
while.
Solution: Add #ifdefs. Update dependencies. Update proto files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 03 Jul 2013 18:49:17 +0200 |
parents | 34c629c3b4ba |
children | b3bd43ef012d |
comparison
equal
deleted
inserted
replaced
5111:a539e15ad57c | 5112:f063be86b632 |
---|---|
81 | 81 |
82 /* Python 3 does not support CObjects, always use Capsules */ | 82 /* Python 3 does not support CObjects, always use Capsules */ |
83 #define PY_USE_CAPSULE | 83 #define PY_USE_CAPSULE |
84 | 84 |
85 #define PyInt Py_ssize_t | 85 #define PyInt Py_ssize_t |
86 #define PyString_Check(obj) PyUnicode_Check(obj) | 86 #ifndef PyString_Check |
87 # define PyString_Check(obj) PyUnicode_Check(obj) | |
88 #endif | |
87 #define PyString_FromString(repr) PyUnicode_FromString(repr) | 89 #define PyString_FromString(repr) PyUnicode_FromString(repr) |
88 #define PyString_FromFormat PyUnicode_FromFormat | 90 #define PyString_FromFormat PyUnicode_FromFormat |
89 #define PyInt_Check(obj) PyLong_Check(obj) | 91 #ifndef PyInt_Check |
92 # define PyInt_Check(obj) PyLong_Check(obj) | |
93 #endif | |
90 #define PyInt_FromLong(i) PyLong_FromLong(i) | 94 #define PyInt_FromLong(i) PyLong_FromLong(i) |
91 #define PyInt_AsLong(obj) PyLong_AsLong(obj) | 95 #define PyInt_AsLong(obj) PyLong_AsLong(obj) |
92 #define Py_ssize_t_fmt "n" | 96 #define Py_ssize_t_fmt "n" |
93 #define Py_bytes_fmt "y" | 97 #define Py_bytes_fmt "y" |
94 | 98 |
154 # define PyObject_Init py3__PyObject_Init | 158 # define PyObject_Init py3__PyObject_Init |
155 # define PyDict_New py3_PyDict_New | 159 # define PyDict_New py3_PyDict_New |
156 # define PyDict_GetItemString py3_PyDict_GetItemString | 160 # define PyDict_GetItemString py3_PyDict_GetItemString |
157 # define PyDict_Next py3_PyDict_Next | 161 # define PyDict_Next py3_PyDict_Next |
158 # define PyMapping_Check py3_PyMapping_Check | 162 # define PyMapping_Check py3_PyMapping_Check |
159 # define PyMapping_Keys py3_PyMapping_Keys | 163 # ifndef PyMapping_Keys |
164 # define PyMapping_Keys py3_PyMapping_Keys | |
165 # endif | |
160 # define PyIter_Next py3_PyIter_Next | 166 # define PyIter_Next py3_PyIter_Next |
161 # define PyObject_GetIter py3_PyObject_GetIter | 167 # define PyObject_GetIter py3_PyObject_GetIter |
162 # define PyObject_Repr py3_PyObject_Repr | 168 # define PyObject_Repr py3_PyObject_Repr |
163 # define PyObject_GetItem py3_PyObject_GetItem | 169 # define PyObject_GetItem py3_PyObject_GetItem |
164 # define PyObject_IsTrue py3_PyObject_IsTrue | 170 # define PyObject_IsTrue py3_PyObject_IsTrue |
200 # endif | 206 # endif |
201 # undef PyUnicode_AsEncodedString | 207 # undef PyUnicode_AsEncodedString |
202 # define PyUnicode_AsEncodedString py3_PyUnicode_AsEncodedString | 208 # define PyUnicode_AsEncodedString py3_PyUnicode_AsEncodedString |
203 # undef PyBytes_AsString | 209 # undef PyBytes_AsString |
204 # define PyBytes_AsString py3_PyBytes_AsString | 210 # define PyBytes_AsString py3_PyBytes_AsString |
205 # define PyBytes_AsStringAndSize py3_PyBytes_AsStringAndSize | 211 # ifndef PyBytes_AsStringAndSize |
212 # define PyBytes_AsStringAndSize py3_PyBytes_AsStringAndSize | |
213 # endif | |
206 # undef PyBytes_FromString | 214 # undef PyBytes_FromString |
207 # define PyBytes_FromString py3_PyBytes_FromString | 215 # define PyBytes_FromString py3_PyBytes_FromString |
208 # define PyFloat_FromDouble py3_PyFloat_FromDouble | 216 # define PyFloat_FromDouble py3_PyFloat_FromDouble |
209 # define PyFloat_AsDouble py3_PyFloat_AsDouble | 217 # define PyFloat_AsDouble py3_PyFloat_AsDouble |
210 # define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr | 218 # define PyObject_GenericGetAttr py3_PyObject_GenericGetAttr |