Mercurial > vim
diff src/if_python3.c @ 3638:80ed6aa7b9eb v7.3.579
updated for version 7.3.579
Problem: Can't compile with Python 2.5.
Solution: Use PyCObject when Capsules are not available.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 29 Jun 2012 16:28:28 +0200 |
parents | c052f3b79b99 |
children | a2f61b2b8e77 |
line wrap: on
line diff
--- a/src/if_python3.c +++ b/src/if_python3.c @@ -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)