Skip to content

Commit 179e534

Browse files
committed
PYCAPI_COMPAT_CAST(): add parenthesis
1 parent ca6a60e commit 179e534

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythoncapi_compat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern "C" {
3737
# define PYCAPI_COMPAT_CAST(TYPE, EXPR) reinterpret_cast<TYPE>(EXPR)
3838
# define PYCAPI_COMPAT_NULL nullptr
3939
#else
40-
# define PYCAPI_COMPAT_CAST(TYPE, EXPR) (TYPE)(EXPR)
40+
# define PYCAPI_COMPAT_CAST(TYPE, EXPR) ((TYPE)(EXPR))
4141
# define PYCAPI_COMPAT_NULL NULL
4242
#endif
4343

@@ -200,7 +200,7 @@ PYCAPI_COMPAT_STATIC_INLINE(PyFrameObject*)
200200
_PyFrame_GetBackBorrow(PyFrameObject *frame)
201201
{
202202
return PYCAPI_COMPAT_CAST(PyFrameObject *,
203-
_Py_XStealRef(PyFrame_GetBack(frame)));
203+
_Py_XStealRef(PyFrame_GetBack(frame)));
204204
}
205205
#endif
206206

0 commit comments

Comments
 (0)