Skip to content

Commit 9699d46

Browse files
committed
Update _testcapi test for Windows
1 parent be8754d commit 9699d46

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/_testcapimodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2050,7 +2050,8 @@ test_macros(PyObject *self, PyObject *Py_UNUSED(args))
20502050
assert(Py_MAX(5, 11) == 11);
20512051
assert(Py_ABS(-5) == 5);
20522052

2053-
#ifdef _Py_TYPEOF
2053+
#if ((defined(__GNUC__) || defined(__clang__)) \
2054+
&& defined(_Py_TYPEOF) && !defined(__cplusplus))
20542055
// When _Py_TYPEOF() is available, arguments are only evaluated once
20552056
int x = 5, y = 11;
20562057
assert(Py_MIN(++x, ++y) == 6);

0 commit comments

Comments
 (0)