Skip to content

Commit 0e6ffd3

Browse files
committed
Remove always true condition defined(PY_VERSION_HEX)
1 parent 225cb46 commit 0e6ffd3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/pybind11/detail/internals.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class pymutex {
239239
void unlock() { PyMutex_Unlock(&mutex); }
240240
};
241241

242-
# if !(defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x030E00C1 /* 3.14.0rc1 */)
242+
# if PY_VERSION_HEX < 0x030E00C1 // 3.14.0rc1
243243
// Forward declaration of internal slow path function for usage in pycritical_section
244244
extern "C" void _PyCriticalSection_BeginSlow(PyCriticalSection *c, PyMutex *m);
245245
# endif
@@ -251,7 +251,7 @@ class pycritical_section {
251251
public:
252252
explicit pycritical_section(pymutex &m) : mutex(m) {
253253
// PyCriticalSection_BeginMutex was added in Python 3.15.0a1 and backported to 3.14.0rc1
254-
# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x030E00C1 /* 3.14.0rc1 */
254+
# if PY_VERSION_HEX >= 0x030E00C1 // 3.14.0rc1
255255
PyCriticalSection_BeginMutex(&cs, &mutex.mutex);
256256
# else
257257
// Use the slow path of internal API `_PyCriticalSection_BeginMutex` for older versions

0 commit comments

Comments
 (0)