mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-89653: Use int type for Unicode kind (#92704)
Use the same type that PyUnicode_FromKindAndData() kind parameter type (public C API): int.
This commit is contained in:
parent
22a1db378c
commit
f62ad4f2c4
13 changed files with 49 additions and 52 deletions
|
@ -868,7 +868,7 @@ Reader_iternext(ReaderObj *self)
|
|||
PyObject *fields = NULL;
|
||||
Py_UCS4 c;
|
||||
Py_ssize_t pos, linelen;
|
||||
unsigned int kind;
|
||||
int kind;
|
||||
const void *data;
|
||||
PyObject *lineobj;
|
||||
|
||||
|
@ -1066,7 +1066,7 @@ join_reset(WriterObj *self)
|
|||
* record length.
|
||||
*/
|
||||
static Py_ssize_t
|
||||
join_append_data(WriterObj *self, unsigned int field_kind, const void *field_data,
|
||||
join_append_data(WriterObj *self, int field_kind, const void *field_data,
|
||||
Py_ssize_t field_len, int *quoted,
|
||||
int copy_phase)
|
||||
{
|
||||
|
@ -1179,7 +1179,7 @@ join_check_rec_size(WriterObj *self, Py_ssize_t rec_len)
|
|||
static int
|
||||
join_append(WriterObj *self, PyObject *field, int quoted)
|
||||
{
|
||||
unsigned int field_kind = -1;
|
||||
int field_kind = -1;
|
||||
const void *field_data = NULL;
|
||||
Py_ssize_t field_len = 0;
|
||||
Py_ssize_t rec_len;
|
||||
|
@ -1211,7 +1211,7 @@ static int
|
|||
join_append_lineterminator(WriterObj *self)
|
||||
{
|
||||
Py_ssize_t terminator_len, i;
|
||||
unsigned int term_kind;
|
||||
int term_kind;
|
||||
const void *term_data;
|
||||
|
||||
terminator_len = PyUnicode_GET_LENGTH(self->dialect->lineterminator);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue