0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.3.579

Problem:    Can't compile with Python 2.5.
Solution:   Use PyCObject when Capsules are not available.
This commit is contained in:
Bram Moolenaar
2012-06-29 16:28:28 +02:00
parent f27839c1a9
commit 2afa3238a1
4 changed files with 53 additions and 7 deletions

View File

@@ -75,6 +75,9 @@ static void init_structs(void);
# define CODEC_ERROR_HANDLER NULL
#endif
/* Python 3 does not support CObjects, always use Capsules */
#define PY_USE_CAPSULE
#define PyInt Py_ssize_t
#define PyString_Check(obj) PyUnicode_Check(obj)
#define PyString_AsBytes(obj) PyUnicode_AsEncodedString(obj, (char *)ENC_OPT, CODEC_ERROR_HANDLER)