Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3b10f4

Browse files
author
Skip Montanaro
committed
One char->Py_UNICODE change missed in r56777 - according to Adam Hupp this is the change to make...
1 parent 4626458 commit e3b10f4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Modules/_csv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,14 @@ get_string(PyObject *str)
169169
}
170170

171171
static PyObject *
172-
get_nullchar_as_None(char c)
172+
get_nullchar_as_None(Py_UNICODE c)
173173
{
174174
if (c == '\0') {
175175
Py_INCREF(Py_None);
176176
return Py_None;
177177
}
178178
else
179-
return PyUnicode_DecodeASCII((char*)&c, 1, NULL);
179+
return PyUnicode_FromUnicode((Py_UNICODE *)&c, 1);
180180
}
181181

182182
static PyObject *

0 commit comments

Comments
 (0)