mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #7142: Fix uses of unicode in memoryview objects
This commit is contained in:
parent
196b0925ca
commit
08133af12e
2 changed files with 9 additions and 2 deletions
|
@ -335,7 +335,7 @@ PyMemoryView_GetContiguous(PyObject *obj, int buffertype, char fort)
|
|||
static PyObject *
|
||||
memory_format_get(PyMemoryViewObject *self)
|
||||
{
|
||||
return PyUnicode_FromString(self->view.format);
|
||||
return PyString_FromString(self->view.format);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
@ -503,7 +503,7 @@ memory_dealloc(PyMemoryViewObject *self)
|
|||
static PyObject *
|
||||
memory_repr(PyMemoryViewObject *self)
|
||||
{
|
||||
return PyUnicode_FromFormat("<memory at %p>", self);
|
||||
return PyString_FromFormat("<memory at %p>", self);
|
||||
}
|
||||
|
||||
/* Sequence methods */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue