Skip to content

Commit cd5f7cc

Browse files
alexmalyshevmeta-codesync[bot]
authored andcommitted
Fix CinderX build with Python 3.14.2
Summary: FT_ATOMIC_LOAD_PTR_CONSUME was added in 3.14.3. When we try to build CinderX for 3.14.2, it breaks because this isn't defined. Follow what the original PR was doing and define it to acquire semantics, which are stronger than consume. See python/cpython#142544 that added this. Reviewed By: yoney Differential Revision: D93925688 fbshipit-source-id: f032caaed424b0f6e883d61627664a8bbd1c5379
1 parent 639765c commit cd5f7cc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cinderx/UpstreamBorrow/borrowed.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@
127127
#define _PyDict_DelItem_KnownHash_LockHeld _CiDict_DelItem_KnownHash_LockHeld
128128
#define _PyInterpreterState_GetConfig _CiInterpreterState_GetConfig
129129

130+
// The 3.14 file is built with 3.14.3, which includes gh-142534 that defines
131+
// this new macro. The lack of it on earlier point releases breaks the build.
132+
#if PY_VERSION_HEX >= 0x030E0000 && PY_VERSION_HEX < 0x030E0300
133+
#define FT_ATOMIC_LOAD_PTR_CONSUME FT_ATOMIC_LOAD_PTR_ACQUIRE
134+
#endif
135+
130136
#ifdef __cplusplus
131137
extern "C" {
132138
#endif

0 commit comments

Comments
 (0)