]> granicus.if.org Git - vim/commitdiff
patch 7.4.910 v7.4.910
authorBram Moolenaar <Bram@vim.org>
Tue, 10 Nov 2015 12:24:20 +0000 (13:24 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 10 Nov 2015 12:24:20 +0000 (13:24 +0100)
Problem:    Compiler complains about type punned pointer.
Solution:   Use another way to increment the ref count.

src/if_py_both.h
src/version.c

index e2f4857e42728126259002bc36b9638f255af8ff..1ad7dc616d54ea63cb2a2e0b16fdec56bcfb3a5c 100644 (file)
@@ -476,16 +476,18 @@ AlwaysNone(PyObject *self UNUSED)
 AlwaysFalse(PyObject *self UNUSED)
 {
     /* do nothing */
-    Py_INCREF(Py_False);
-    return Py_False;
+    PyObject   *ret = Py_False;
+    Py_INCREF(ret);
+    return ret;
 }
 
     static PyObject *
 AlwaysTrue(PyObject *self UNUSED)
 {
     /* do nothing */
-    Py_INCREF(Py_True);
-    return Py_True;
+    PyObject   *ret = Py_True;
+    Py_INCREF(ret);
+    return ret;
 }
 
 /***************/
index 73713feacfdfeef74096e98e6f9fd0c185aad89e..e8b664fa69fa70cd13b05e0f63054a9f1c06f912 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    910,
 /**/
     909,
 /**/