Skip to content

Commit 136f64d

Browse files
committed
gh-106320: Remove _Py_SwappedOp from the C API
Move _Py_SwappedOp to the internal C API (pycore_object.h).
1 parent eda9ce1 commit 136f64d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Include/cpython/object.h

-5
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,6 @@ PyAPI_FUNC(PyObject *) _PyObject_FunctionStr(PyObject *);
377377
#endif
378378

379379

380-
/* Maps Py_LT to Py_GT, ..., Py_GE to Py_LE.
381-
* Defined in object.c.
382-
*/
383-
PyAPI_DATA(int) _Py_SwappedOp[];
384-
385380
PyAPI_FUNC(void)
386381
_PyDebugAllocatorStats(FILE *out, const char *block_name, int num_blocks,
387382
size_t sizeof_block);

Include/internal/pycore_object.h

+3
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@ extern PyObject* _PyCFunctionWithKeywords_TrampolineCall(
442442
PyAPI_DATA(PyTypeObject) _PyNone_Type;
443443
PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
444444

445+
/* Maps Py_LT to Py_GT, ..., Py_GE to Py_LE. Defined in Objects/object.c. */
446+
extern int _Py_SwappedOp[];
447+
445448
#ifdef __cplusplus
446449
}
447450
#endif

0 commit comments

Comments
 (0)