bpo-43693: Revert commits 2c1e2583fd and b2bf2bc1ec (GH-26530)

* Revert "bpo-43693: Compute deref offsets in compiler (gh-25152)"

This reverts commit b2bf2bc1ec.

* Revert "bpo-43693: Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388)"

This reverts commit 2c1e2583fd.

These two commits are breaking the refleak buildbots.
This commit is contained in:
Pablo Galindo 2021-06-04 17:51:05 +01:00 committed by GitHub
parent a46c220edc
commit 17c4edc4e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 5707 additions and 6028 deletions

View file

@ -3,7 +3,6 @@
#include "pycore_frame.h"
#include "pycore_pyerrors.h"
#include "pycore_code.h" // _PyCode_GetVarnames()
#define MAX_CANDIDATE_ITEMS 750
#define MAX_STRING_SIZE 40
@ -211,12 +210,8 @@ offer_suggestions_for_name_error(PyNameErrorObject *exc)
PyFrameObject *frame = traceback->tb_frame;
assert(frame != NULL);
PyCodeObject *code = PyFrame_GetCode(frame);
assert(code != NULL && code->co_localsplusnames != NULL);
PyObject *varnames = _PyCode_GetVarnames(code);
if (varnames == NULL) {
return NULL;
}
PyObject *dir = PySequence_List(varnames);
assert(code != NULL && code->co_varnames != NULL);
PyObject *dir = PySequence_List(code->co_varnames);
Py_DECREF(code);
if (dir == NULL) {
return NULL;