summaryrefslogtreecommitdiffstats
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-11-10 13:24:20 +0100
committerBram Moolenaar <Bram@vim.org>2015-11-10 13:24:20 +0100
commite7427f4b7e1af6a63600183be6b4c5724beb2f66 (patch)
tree49015b7e639b94b79255f140cb4de5bec5ba5de0 /src/if_py_both.h
parentde59ba33aa3b94f2757dbf3451682d762c15ebcf (diff)
patch 7.4.910v7.4.910
Problem: Compiler complains about type punned pointer. Solution: Use another way to increment the ref count.
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index e2f4857e42..1ad7dc616d 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -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;
}
/***************/