Skip to content

Commit e59a952

Browse files
authored
gh-108444: Remove _PyLong_AsInt() function (#108461)
* Update Parser/asdl_c.py to regenerate Python/Python-ast.c. * Remove _PyLong_AsInt() alias to PyLong_AsInt().
1 parent 24aa249 commit e59a952

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

Include/cpython/longobject.h

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# error "this header file must not be included directly"
33
#endif
44

5-
// Alias for backport compatibility
6-
#define _PyLong_AsInt PyLong_AsInt
7-
85
PyAPI_FUNC(int) _PyLong_UnsignedShort_Converter(PyObject *, void *);
96
PyAPI_FUNC(int) _PyLong_UnsignedInt_Converter(PyObject *, void *);
107
PyAPI_FUNC(int) _PyLong_UnsignedLong_Converter(PyObject *, void *);

Parser/asdl_c.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def visitModule(self, mod):
10741074
return 1;
10751075
}
10761076
1077-
i = _PyLong_AsInt(obj);
1077+
i = PyLong_AsInt(obj);
10781078
if (i == -1 && PyErr_Occurred())
10791079
return 1;
10801080
*out = i;

Python/Python-ast.c

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)