gh-93382: Sync up co_code changes with 3.11 (GH-94227)

Sync up co_code changes with 3.11 commit 852b4d4bcd.
This commit is contained in:
Ken Jin 2022-06-25 01:55:18 +08:00 committed by GitHub
parent a91ffcf3fa
commit 50a5ab2c0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View file

@ -1440,7 +1440,7 @@ _PyCode_GetCode(PyCodeObject *co)
}
deopt_code((_Py_CODEUNIT *)PyBytes_AS_STRING(code), Py_SIZE(co));
assert(co->_co_code == NULL);
co->_co_code = (void *)Py_NewRef(code);
co->_co_code = Py_NewRef(code);
return code;
}