[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

Serhiy Storchaka report at bugs.python.org
Sun Oct 3 13:00:44 EDT 2021


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

Some C code in 3.10+ uses literal 2 for the size of the code unit. It should use sizeof(_Py_CODEUNIT) instead.

1. It is self-documented and allows to distinguish this 2 from other 2 constants.
2. It will help if we change from 16-bit code units to 24-, 32- or 64-bit code units.

----------
components: Interpreter Core
messages: 403101
nosy: Mark.Shannon, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit
versions: Python 3.10, Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45355>
_______________________________________


More information about the Python-bugs-list mailing list