diff src/if_py_both.h @ 5666:d1c8c1d64034 v7.4.179

updated for version 7.4.179 Problem: Warning for type-punned pointer. (Tony Mechelynck) Solution: Use intermediate variable.
author Bram Moolenaar <bram@vim.org>
date Wed, 12 Feb 2014 22:08:49 +0100
parents ae228baaec2c
children b1b8b097539a
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -1617,8 +1617,9 @@ DictionaryLength(DictionaryObject *self)
     }
     else if (flags & DICT_FLAG_RETURN_BOOL)
     {
-	Py_INCREF(Py_True);
-	return Py_True;
+	ret = Py_True;
+	Py_INCREF(ret);
+	return ret;
     }
 
     di = dict_lookup(hi);