diff options
author | Victor Stinner <vstinner@python.org> | 2024-09-02 13:23:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-02 13:23:29 (GMT) |
commit | 10735bff9e097626ea319ac19aab0e16a57729e1 (patch) | |
tree | 6d3877c4c1cfdae35d6a69d13eea1867be2af3fd /Objects/bytesobject.c | |
parent | b76a4a5db7b4f97942b2cd7027f5a59ce7cbb523 (diff) | |
download | cpython-10735bff9e097626ea319ac19aab0e16a57729e1.zip cpython-10735bff9e097626ea319ac19aab0e16a57729e1.tar.gz cpython-10735bff9e097626ea319ac19aab0e16a57729e1.tar.bz2 |
[3.13] gh-123091: Use _Py_IsImmortalLoose() (#123511) (#123600)
gh-123091: Use _Py_IsImmortalLoose() (#123511)
Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c
and ceval.c.
(cherry picked from commit f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91)
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index cd799a9..b8bcef2 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -46,7 +46,7 @@ Py_LOCAL_INLINE(Py_ssize_t) _PyBytesWriter_GetSize(_PyBytesWriter *writer, static inline PyObject* bytes_get_empty(void) { PyObject *empty = &EMPTY->ob_base.ob_base; - assert(_Py_IsImmortal(empty)); + assert(_Py_IsImmortalLoose(empty)); return empty; } @@ -119,7 +119,7 @@ PyBytes_FromStringAndSize(const char *str, Py_ssize_t size) } if (size == 1 && str != NULL) { op = CHARACTER(*str & 255); - assert(_Py_IsImmortal(op)); + assert(_Py_IsImmortalLoose(op)); return (PyObject *)op; } if (size == 0) { @@ -155,7 +155,7 @@ PyBytes_FromString(const char *str) } else if (size == 1) { op = CHARACTER(*str & 255); - assert(_Py_IsImmortal(op)); + assert(_Py_IsImmortalLoose(op)); return (PyObject *)op; } |