Kaydet (Commit) 8b1271b1 authored tarafından Eddie Elizondo's avatar Eddie Elizondo Kaydeden (comit) Dino Viehland

Only count number of members once (#12691)

üst e152169d
...@@ -2895,6 +2895,7 @@ PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases) ...@@ -2895,6 +2895,7 @@ PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases)
nmembers = 0; nmembers = 0;
for (slot = spec->slots; slot->slot; slot++) { for (slot = spec->slots; slot->slot; slot++) {
if (slot->slot == Py_tp_members) { if (slot->slot == Py_tp_members) {
nmembers = 0;
for (memb = slot->pfunc; memb->name != NULL; memb++) { for (memb = slot->pfunc; memb->name != NULL; memb++) {
nmembers++; nmembers++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment