diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-06-09 15:33:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 15:33:43 (GMT) |
commit | 0383be4666905f9e24ca791afda845a7686b3fe3 (patch) | |
tree | d2275560ea7827360d5777568da85e44b04f1941 /Modules/_csv.c | |
parent | 51ae31e5b93b986e57a7e18e25f981a6ffcdefb7 (diff) | |
download | cpython-0383be4666905f9e24ca791afda845a7686b3fe3.zip cpython-0383be4666905f9e24ca791afda845a7686b3fe3.tar.gz cpython-0383be4666905f9e24ca791afda845a7686b3fe3.tar.bz2 |
Remove usesless function from csv module (GH-20762)
Diffstat (limited to 'Modules/_csv.c')
-rw-r--r-- | Modules/_csv.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c index 7e44419..2d42477 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -147,13 +147,6 @@ get_dialect_from_registry(PyObject * name_obj) } static PyObject * -get_string(PyObject *str) -{ - Py_XINCREF(str); - return str; -} - -static PyObject * get_nullchar_as_None(Py_UCS4 c) { if (c == '\0') { @@ -166,7 +159,8 @@ get_nullchar_as_None(Py_UCS4 c) static PyObject * Dialect_get_lineterminator(DialectObj *self, void *Py_UNUSED(ignored)) { - return get_string(self->lineterminator); + Py_XINCREF(self->lineterminator); + return self->lineterminator; } static PyObject * |