diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-23 12:30:59 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-23 12:30:59 +0200 |
commit | a5c896babbece4868dffd1e8e64ab88afe55b46f (patch) | |
tree | 35438398ad09a477613bc77a594c9860a32ec8ab /Objects/structseq.c | |
parent | c0f01d9eb22ed81c49d8c9fbfd49b6d4c4020310 (diff) | |
parent | 1bd620bca594ba9193c63e79e7836765d23047cc (diff) | |
download | cpython-a5c896babbece4868dffd1e8e64ab88afe55b46f.tar.gz |
Issue #26729: Fixed __text_signature__ for sorted().
Patch by Erik Welch.
Diffstat (limited to 'Objects/structseq.c')
-rw-r--r-- | Objects/structseq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/structseq.c b/Objects/structseq.c index 5489aef6d0..c2ece5abb1 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -182,7 +182,7 @@ structseq_repr(PyStructSequence *obj) for (i=0; i < VISIBLE_SIZE(obj); i++) { PyObject *val, *repr; - char *cname, *crepr; + const char *cname, *crepr; cname = typ->tp_members[i].name; if (cname == NULL) { @@ -256,7 +256,7 @@ structseq_reduce(PyStructSequence* self) } for (; i < n_fields; i++) { - char *n = Py_TYPE(self)->tp_members[i-n_unnamed_fields].name; + const char *n = Py_TYPE(self)->tp_members[i-n_unnamed_fields].name; if (PyDict_SetItemString(dict, n, self->ob_item[i]) < 0) goto error; } |