summaryrefslogtreecommitdiff
path: root/src/if_python.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-21 21:01:59 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-21 21:01:59 +0200
commit4ce5fe4c87820c7d22964d6e91d7b07e96640e6f (patch)
tree900ca0ee352311d36d485c2dd12a9e828e274ab3 /src/if_python.c
parentc58f5456e5c5f21193e960cecc434e367ef1281e (diff)
downloadvim-git-4ce5fe4c87820c7d22964d6e91d7b07e96640e6f.tar.gz
patch 8.2.1883: compiler warnings when using Pythonv8.2.1883
Problem: Compiler warnings when using Python. Solution: Adjust PyCFunction to also have the second argument. Use "int" return type for some functions. Insert "(void *)" to get rid of the remaining warnings.
Diffstat (limited to 'src/if_python.c')
-rw-r--r--src/if_python.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/if_python.c b/src/if_python.c
index 394ed3e4a..6338a5b8d 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -1197,16 +1197,16 @@ OutputGetattr(PyObject *self, char *name)
#define BufferType_Check(obj) ((obj)->ob_type == &BufferType)
-static PyInt BufferAssItem(PyObject *, PyInt, PyObject *);
-static PyInt BufferAssSlice(PyObject *, PyInt, PyInt, PyObject *);
+static int BufferAssItem(PyObject *, PyInt, PyObject *);
+static int BufferAssSlice(PyObject *, PyInt, PyInt, PyObject *);
// Line range type - Implementation functions
// --------------------------------------
#define RangeType_Check(obj) ((obj)->ob_type == &RangeType)
-static PyInt RangeAssItem(PyObject *, PyInt, PyObject *);
-static PyInt RangeAssSlice(PyObject *, PyInt, PyInt, PyObject *);
+static int RangeAssItem(PyObject *, PyInt, PyObject *);
+static int RangeAssSlice(PyObject *, PyInt, PyInt, PyObject *);
// Current objects type - Implementation functions
// -----------------------------------------------
@@ -1246,13 +1246,13 @@ BufferGetattr(PyObject *self, char *name)
//////////////////
- static PyInt
+ static int
BufferAssItem(PyObject *self, PyInt n, PyObject *val)
{
return RBAsItem((BufferObject *)(self), n, val, 1, -1, NULL);
}
- static PyInt
+ static int
BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val)
{
return RBAsSlice((BufferObject *)(self), lo, hi, val, 1, -1, NULL);
@@ -1290,7 +1290,7 @@ RangeGetattr(PyObject *self, char *name)
////////////////
- static PyInt
+ static int
RangeAssItem(PyObject *self, PyInt n, PyObject *val)
{
return RBAsItem(((RangeObject *)(self))->buf, n, val,
@@ -1299,7 +1299,7 @@ RangeAssItem(PyObject *self, PyInt n, PyObject *val)
&((RangeObject *)(self))->end);
}
- static PyInt
+ static int
RangeAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val)
{
return RBAsSlice(((RangeObject *)(self))->buf, lo, hi, val,