Skip to content
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
Revert _csv.Error changes
  • Loading branch information
Erlend E. Aasland committed May 12, 2021
commit b8772d6d405c4160d8ce19f58074c92e1d4ab7c0
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