diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2017-03-21 08:53:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-21 08:53:25 +0200 |
| commit | fff9a31a91283c39c363af219e595eab7d4da6f7 (patch) | |
| tree | 0dfdec9e4e3e7caec6804bcc1fef1f2c19b9e532 /Objects/unicodeobject.c | |
| parent | c61ac1642d19f54c7b755098230967ad2e603180 (diff) | |
| download | cpython-git-fff9a31a91283c39c363af219e595eab7d4da6f7.tar.gz | |
bpo-29865: Use PyXXX_GET_SIZE macros rather than Py_SIZE for concrete types. (#748)
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 1a696cc5c8..d3a7f54d0e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -3633,7 +3633,8 @@ PyUnicode_AsEncodedString(PyObject *unicode, return NULL; } - b = PyBytes_FromStringAndSize(PyByteArray_AS_STRING(v), Py_SIZE(v)); + b = PyBytes_FromStringAndSize(PyByteArray_AS_STRING(v), + PyByteArray_GET_SIZE(v)); Py_DECREF(v); return b; } |
