summaryrefslogtreecommitdiff
path: root/src/if_python3.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-07-03 18:49:17 +0200
committerBram Moolenaar <Bram@vim.org>2013-07-03 18:49:17 +0200
commit32ac8cdaaaa32c09b0818c214e01e8e557d88b56 (patch)
tree95d169cbeb3d98450e7991e210ef5be77412f61a /src/if_python3.c
parent0f5a5ed8bb3c014ef9de0480852a3e5737c33fc6 (diff)
downloadvim-git-32ac8cdaaaa32c09b0818c214e01e8e557d88b56.tar.gz
updated for version 7.3.1299v7.3.1299
Problem: Errors when doing "make proto". Didn't do "make depend" for a while. Solution: Add #ifdefs. Update dependencies. Update proto files.
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index 6849f1fb1..8a7a3a4b1 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -83,10 +83,14 @@
#define PY_USE_CAPSULE
#define PyInt Py_ssize_t
-#define PyString_Check(obj) PyUnicode_Check(obj)
+#ifndef PyString_Check
+# define PyString_Check(obj) PyUnicode_Check(obj)
+#endif
#define PyString_FromString(repr) PyUnicode_FromString(repr)
#define PyString_FromFormat PyUnicode_FromFormat
-#define PyInt_Check(obj) PyLong_Check(obj)
+#ifndef PyInt_Check
+# define PyInt_Check(obj) PyLong_Check(obj)
+#endif
#define PyInt_FromLong(i) PyLong_FromLong(i)
#define PyInt_AsLong(obj) PyLong_AsLong(obj)
#define Py_ssize_t_fmt "n"
@@ -156,7 +160,9 @@
# define PyDict_GetItemString py3_PyDict_GetItemString
# define PyDict_Next py3_PyDict_Next
# define PyMapping_Check py3_PyMapping_Check
-# define PyMapping_Keys py3_PyMapping_Keys
+# ifndef PyMapping_Keys
+# define PyMapping_Keys py3_PyMapping_Keys
+# endif
# define PyIter_Next py3_PyIter_Next
# define PyObject_GetIter py3_PyObject_GetIter
# define PyObject_Repr py3_PyObject_Repr
@@ -202,7 +208,9 @@
# define PyUnicode_AsEncodedString py3_PyUnicode_AsEncodedString
# undef PyBytes_AsString
# define PyBytes_AsString py3_PyBytes_AsString
-# define PyBytes_AsStringAndSize py3_PyBytes_AsStringAndSize
+# ifndef PyBytes_AsStringAndSize
+# define PyBytes_AsStringAndSize py3_PyBytes_AsStringAndSize
+# endif
# undef PyBytes_FromString
# define PyBytes_FromString py3_PyBytes_FromString
# define PyFloat_FromDouble py3_PyFloat_FromDouble