<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Python/pyhash.c, branch enum-lost-fixes</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-43475:  Fix worst case collision behavior for NaN instances (GH-25493)</title>
<updated>2021-04-22T15:34:57+00:00</updated>
<author>
<name>Raymond Hettinger</name>
<email>rhettinger@users.noreply.github.com</email>
</author>
<published>2021-04-22T15:34:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a07da09ad5bd7d234ccd084a3a0933c290d1b592'/>
<id>a07da09ad5bd7d234ccd084a3a0933c290d1b592</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40943: Replace PY_FORMAT_SIZE_T with "z" (GH-20781)</title>
<updated>2020-06-10T16:38:05+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-06-10T16:38:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=d36cf5f1d20ce9f111a8fc997104785086e8eee6'/>
<id>d36cf5f1d20ce9f111a8fc997104785086e8eee6</id>
<content type='text'>
The PEP 353, written in 2005, introduced PY_FORMAT_SIZE_T. Python no
longer supports macOS 10.4 and Visual Studio 2010, but requires more
recent macOS and Visual Studio versions. In 2020 with Python 3.10, it
is now safe to use directly "%zu" to format size_t and "%zi" to
format Py_ssize_t.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The PEP 353, written in 2005, introduced PY_FORMAT_SIZE_T. Python no
longer supports macOS 10.4 and Visual Studio 2010, but requires more
recent macOS and Visual Studio versions. In 2020 with Python 3.10, it
is now safe to use directly "%zu" to format size_t and "%zi" to
format Py_ssize_t.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-40602: Add _Py_HashPointerRaw() function (GH-20056)</title>
<updated>2020-05-12T16:46:20+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-05-12T16:46:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=f453221c8b80e0570066a9375337f208d50e6406'/>
<id>f453221c8b80e0570066a9375337f208d50e6406</id>
<content type='text'>
Add a new _Py_HashPointerRaw() function which avoids replacing -1
with -2 to micro-optimize hash table using pointer keys: using
_Py_hashtable_hash_ptr() hash function.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new _Py_HashPointerRaw() function which avoids replacing -1
with -2 to micro-optimize hash table using pointer keys: using
_Py_hashtable_hash_ptr() hash function.</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-40184: Only define pysiphash if the hash algorithm is SIPHASH24. (GH-19369)</title>
<updated>2020-04-04T21:25:12+00:00</updated>
<author>
<name>Batuhan Taşkaya</name>
<email>batuhanosmantaskaya@gmail.com</email>
</author>
<published>2020-04-04T21:25:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=1b21573a89632356737a24302dd64c9eb1457a7b'/>
<id>1b21573a89632356737a24302dd64c9eb1457a7b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-39605: Fix some casts to not cast away const. (GH-18453)</title>
<updated>2020-02-12T02:28:35+00:00</updated>
<author>
<name>Andy Lester</name>
<email>andy@petdance.com</email>
</author>
<published>2020-02-12T02:28:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=e6be9b59a911626d6597fe148c32f0342bd2bd24'/>
<id>e6be9b59a911626d6597fe148c32f0342bd2bd24</id>
<content type='text'>
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:

Adding the const to the type cast, as in:

-    return _PyUnicode_FromUCS1((unsigned char*)s, size);
+    return _PyUnicode_FromUCS1((const unsigned char*)s, size);

or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:

-    PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+    PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);

These changes will not change code, but they will make it much easier to check for errors in consts</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc -Wcast-qual turns up a number of instances of casting away constness of pointers. Some of these can be safely modified, by either:

Adding the const to the type cast, as in:

-    return _PyUnicode_FromUCS1((unsigned char*)s, size);
+    return _PyUnicode_FromUCS1((const unsigned char*)s, size);

or, Removing the cast entirely, because it's not necessary (but probably was at one time), as in:

-    PyDTrace_FUNCTION_ENTRY((char *)filename, (char *)funcname, lineno);
+    PyDTrace_FUNCTION_ENTRY(filename, funcname, lineno);

These changes will not change code, but they will make it much easier to check for errors in consts</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-39127: Make _Py_HashPointer's argument be const (GH-17690)</title>
<updated>2020-02-05T21:09:57+00:00</updated>
<author>
<name>Andy Lester</name>
<email>andy@petdance.com</email>
</author>
<published>2020-02-05T21:09:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=3d06953c34fd6421dd1dfdb615578cde676ee0eb'/>
<id>3d06953c34fd6421dd1dfdb615578cde676ee0eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-31849: Fix warning in pyhash.c (GH-6799)</title>
<updated>2018-06-04T10:57:08+00:00</updated>
<author>
<name>A. Jesse Jiryu Davis</name>
<email>jesse@emptysquare.net</email>
</author>
<published>2018-06-04T10:57:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=a8eb58546b37a7cd5f332f019bb07388f5212c2d'/>
<id>a8eb58546b37a7cd5f332f019bb07388f5212c2d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-28055: Fix unaligned accesses in siphash24(). (GH-6123)</title>
<updated>2018-05-13T10:57:31+00:00</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eike@sf-mail.de</email>
</author>
<published>2018-05-13T10:57:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=1e2ec8a996daec65d8d5a3d43b66a9909c6d0653'/>
<id>1e2ec8a996daec65d8d5a3d43b66a9909c6d0653</id>
<content type='text'>
The hash implementation casts the input pointer to uint64_t* and directly reads
from this, which may cause unaligned accesses. Use memcpy() instead so this code
will not crash with SIGBUS on sparc.

https://bugs.gentoo.org/show_bug.cgi?id=636400</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The hash implementation casts the input pointer to uint64_t* and directly reads
from this, which may cause unaligned accesses. Use memcpy() instead so this code
will not crash with SIGBUS on sparc.

https://bugs.gentoo.org/show_bug.cgi?id=636400</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some warnings produced by different compilers. (#5593)</title>
<updated>2018-02-09T15:31:26+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2018-02-09T15:31:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=bfe4fd5f2e96e72eecb5b8a0c7df0ac1689f3b7e'/>
<id>bfe4fd5f2e96e72eecb5b8a0c7df0ac1689f3b7e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-32460: ensure all non-static globals have initializers (#5061)</title>
<updated>2017-12-31T18:04:13+00:00</updated>
<author>
<name>Benjamin Peterson</name>
<email>benjamin@python.org</email>
</author>
<published>2017-12-31T18:04:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython-git.git/commit/?id=0a37a30037073a4a9ba45e560c8445048e5f2ba2'/>
<id>0a37a30037073a4a9ba45e560c8445048e5f2ba2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
