Revert "gh-132775: Add _PyCode_GetVarCounts() (gh-133128)" (gh-133232)

The change broke the s390 builds, so I'm reverting it while I investigate.

This reverts commit 94b4fcd806.
This commit is contained in:
Eric Snow 2025-04-30 20:35:20 -06:00 committed by GitHub
parent 0119791326
commit 811edcf9cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 0 additions and 689 deletions

View file

@ -565,57 +565,6 @@ extern int _Py_ClearUnusedTLBC(PyInterpreterState *interp);
#endif
typedef struct {
int total;
struct co_locals_counts {
int total;
struct {
int total;
int numposonly;
int numposorkw;
int numkwonly;
int varargs;
int varkwargs;
} args;
int numpure;
struct {
int total;
// numargs does not contribute to locals.total.
int numargs;
int numothers;
} cells;
struct {
int total;
int numpure;
int numcells;
} hidden;
} locals;
int numfree; // nonlocal
struct co_unbound_counts {
int total;
struct {
int total;
int numglobal;
int numbuiltin;
int numunknown;
} globals;
int numattrs;
int numunknown;
} unbound;
} _PyCode_var_counts_t;
PyAPI_FUNC(void) _PyCode_GetVarCounts(
PyCodeObject *,
_PyCode_var_counts_t *);
PyAPI_FUNC(int) _PyCode_SetUnboundVarCounts(
PyThreadState *,
PyCodeObject *,
_PyCode_var_counts_t *,
PyObject *globalnames,
PyObject *attrnames,
PyObject *globalsns,
PyObject *builtinsns);
PyAPI_FUNC(int) _PyCode_ReturnsOnlyNone(PyCodeObject *);