summaryrefslogtreecommitdiff
path: root/Include/objimpl.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-06-20 16:04:52 +0200
committerGitHub <noreply@github.com>2022-06-20 16:04:52 +0200
commit7ad6f74fcf9db1ccfeaf0986064870d8d3887300 (patch)
tree2b140e0e4fdb3b58379887bab6ff68ade5c67c60 /Include/objimpl.h
parent61f24e7885bed096b5d7f75aff13c1001994b35a (diff)
downloadcpython-git-7ad6f74fcf9db1ccfeaf0986064870d8d3887300.tar.gz
gh-87347: Add parenthesis around macro arguments (#93915)
Add unit test on Py_MEMBER_SIZE() and some other macros.
Diffstat (limited to 'Include/objimpl.h')
-rw-r--r--Include/objimpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 4fa670e71a..140918198d 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -135,14 +135,14 @@ PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t);
// Alias to PyObject_New(). In Python 3.8, PyObject_NEW() called directly
// PyObject_MALLOC() with _PyObject_SIZE().
-#define PyObject_NEW(type, typeobj) PyObject_New(type, typeobj)
+#define PyObject_NEW(type, typeobj) PyObject_New((type), (typeobj))
#define PyObject_NewVar(type, typeobj, n) \
( (type *) _PyObject_NewVar((typeobj), (n)) )
// Alias to PyObject_NewVar(). In Python 3.8, PyObject_NEW_VAR() called
// directly PyObject_MALLOC() with _PyObject_VAR_SIZE().
-#define PyObject_NEW_VAR(type, typeobj, n) PyObject_NewVar(type, typeobj, n)
+#define PyObject_NEW_VAR(type, typeobj, n) PyObject_NewVar((type), (typeobj), (n))
/*