Skip to content

Commit

Permalink
pythongh-108444: Remove _PyLong_AsInt() function
Browse files Browse the repository at this point in the history
* Update Parser/asdl_c.py to regenerate Python/Python-ast.c.
* Remove _PyLong_AsInt() alias to PyLong_AsInt().
  • Loading branch information
vstinner committed Aug 24, 2023
1 parent be436e0 commit a9d062c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Include/cpython/longobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# error "this header file must not be included directly"
#endif

// Alias for backport compatibility
#define _PyLong_AsInt PyLong_AsInt

PyAPI_FUNC(int) _PyLong_UnsignedShort_Converter(PyObject *, void *);
PyAPI_FUNC(int) _PyLong_UnsignedInt_Converter(PyObject *, void *);
PyAPI_FUNC(int) _PyLong_UnsignedLong_Converter(PyObject *, void *);
Expand Down
2 changes: 1 addition & 1 deletion Parser/asdl_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ def visitModule(self, mod):
return 1;
}
i = _PyLong_AsInt(obj);
i = PyLong_AsInt(obj);
if (i == -1 && PyErr_Occurred())
return 1;
*out = i;
Expand Down
2 changes: 1 addition & 1 deletion Python/Python-ast.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a9d062c

Please sign in to comment.