summaryrefslogtreecommitdiffstats
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorkylo252 <59826753+kylo252@users.noreply.github.com>2022-03-27 20:05:17 +0100
committerBram Moolenaar <Bram@vim.org>2022-03-27 20:05:17 +0100
commit9dac9b1751dd43c02470cc6a2aecaeea27abcc80 (patch)
treeb4f2ed0cd629c7773bbb6fee0ed6d0ec59e8eeaf /src/if_py_both.h
parent3e559cd88486ffab6b6fb4e0921b4600d137a617 (diff)
patch 8.2.4639: not sufficient parenthesis in preprocessor macros
Problem: Not sufficient parenthesis in preprocessor macros. Solution: Add more parenthesis. (closes #10031)
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r--src/if_py_both.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 6d7b9687ac..84afc15f59 100644
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -30,9 +30,9 @@ static const char *vim_special_path = "_vim_path_";
#define PyErr_FORMAT2(exc, str, arg1, arg2) PyErr_Format(exc, _(str), arg1,arg2)
#define PyErr_VIM_FORMAT(str, arg) PyErr_FORMAT(VimError, str, arg)
-#define Py_TYPE_NAME(obj) (obj->ob_type->tp_name == NULL \
+#define Py_TYPE_NAME(obj) ((obj)->ob_type->tp_name == NULL \
? "(NULL)" \
- : obj->ob_type->tp_name)
+ : (obj)->ob_type->tp_name)
#define RAISE_NO_EMPTY_KEYS PyErr_SET_STRING(PyExc_ValueError, \
N_("empty keys are not allowed"))
@@ -6686,7 +6686,7 @@ init_structs(void)
}
#define PYTYPE_READY(type) \
- if (PyType_Ready(&type)) \
+ if (PyType_Ready(&(type))) \
return -1;
static int