8000 Remove usesless function from csv module (GH-20762) · python/cpython@0383be4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0383be4

Browse files
authored
Remove usesless function from csv module (GH-20762)
1 parent 51ae31e commit 0383be4

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Modules/_csv.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,6 @@ get_dialect_from_registry(PyObject * name_obj)
146146
return dialect_obj;
147147
}
148148

149-
static PyObject *
150-
get_string(PyObject *str)
151-
{
152-
Py_XINCREF(str);
153-
return str;
154-
}
155-
156149
static PyObject *
157150
get_nullchar_as_None(Py_UCS4 c)
158151
{
@@ -166,7 +159,8 @@ get_nullchar_as_None(Py_UCS4 c)
166159
static PyObject *
167160
Dialect_get_lineterminator(DialectObj *self, void *Py_UNUSED(ignored))
168161
{
169-
return get_string(self->lineterminator);
162+
Py_XINCREF(self->lineterminator);
163+
return self->lineterminator;
170164
}
171165

172166
static PyObject *

0 commit comments

Comments
 (0)
0