8000 bpo-45383: Inherit MetaClass from bases in FromSpec API by seberg · Pull Request #28748 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45383: Inherit MetaClass from bases in FromSpec API #28748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use PyErr_Occurred rather than a variable
  • Loading branch information
encukou committed Jun 9, 2022
commit 2f47be342c056c4008ea111a11cf8dadb5f03d0e
4 changes: 1 addition & 3 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -3410,7 +3410,6 @@ PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module,
PyTypeObject *type;
PyObject *bases = NULL;
int r;
int success = 0;

const PyType_Slot *slot;
Py_ssize_t nmembers, weaklistoffset, dictoffset, vectorcalloffset;
Expand Down Expand Up @@ -3670,10 +3669,9 @@ PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module,
}

assert(_PyType_CheckConsistency(type));
success = 1;

finally:
if (!success) {
if (PyErr_Occurred()) {
Py_CLEAR(res);
}
Py_XDECREF(bases);
Expand Down
0