diff options
author | Victor Stinner <vstinner@python.org> | 2024-09-02 12:25:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-02 12:25:19 (GMT) |
commit | f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91 (patch) | |
tree | ab17e40e32127f2657a5a47549a418e063a71ac2 /Objects/bytesobject.c | |
parent | 22fdb8cf899d2dd29f2ac0bf61309af6809719fb (diff) | |
download | cpython-f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91.zip cpython-f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91.tar.gz cpython-f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91.tar.bz2 |
gh-123091: Use _Py_IsImmortalLoose() (#123511)
Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c
and ceval.c.
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 4a7c21f..ba66368 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; } |