[New-bugs-announce] [issue39127] _Py_HashPointer's void * argument should be const
Andy Lester
report at bugs.python.org
Mon Dec 23 23:43:00 EST 2019
New submission from Andy Lester <andy at petdance.com>:
_Py_HashPointer in Python/pyhash.c takes a pointer argument that can be made const. This will let compiler and static analyzers know that the pointer's target is not modified. You can also change calls to _Py_HashPointer that are down-casting pointers.
For example, in meth_hash in Objects/methodobject.c, this call can have the void * changed to const void *.
y = _Py_HashPointer((void*)(a->m_ml->ml_meth));
----------
components: Interpreter Core
messages: 358839
nosy: petdance
priority: normal
severity: normal
status: open
title: _Py_HashPointer's void * argument should be const
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39127>
_______________________________________
More information about the New-bugs-announce
mailing list