New submission from Andy Lester <[email protected]>:
_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 <[email protected]>
<https://bugs.python.org/issue39127>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com