Skip to content

Commit

Permalink
Revert _csv.Error changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Erlend E. Aasland committed May 12, 2021
1 parent 01edb37 commit b8772d6
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions Modules/_csv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1530,31 +1530,13 @@ csv_field_size_limit(PyObject *module, PyObject *args)
return PyLong_FromLong(old_limit);
}

static void
error_dealloc(PyObject *self)
{
PyObject_GC_UnTrack(self);
PyTypeObject *tp = Py_TYPE(self);
tp->tp_free((PyObject *)self);
Py_DECREF(tp);
}

static int
error_traverse(PyObject *self, visitproc visit, void *arg)
{
Py_VISIT(Py_TYPE(self));
return 0;
}

static PyType_Slot error_slots[] = {
{Py_tp_traverse, error_traverse},
{Py_tp_dealloc, error_dealloc},
{0, NULL},
};

PyType_Spec error_spec = {
.name = "_csv.Error",
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
.slots = error_slots,
};

Expand Down

0 comments on commit b8772d6

Please sign in to comment.