<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Modules/arraymodule.c, branch misc-acks-comment</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-38916: array.array: remove fromstring() and tostring() (GH-17487)</title>
<updated>2019-12-09T13:09:14+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2019-12-09T13:09:14+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0131aba5ae20d704b972ecd2ef0fc6c9e370a1b3'/>
<id>0131aba5ae20d704b972ecd2ef0fc6c9e370a1b3</id>
<content type='text'>
array.array: Remove tostring() and fromstring() methods.  They were
aliases to tobytes() and frombytes(), deprecated since Python 3.2.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
array.array: Remove tostring() and fromstring() methods.  They were
aliases to tobytes() and frombytes(), deprecated since Python 3.2.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38677: Fix arraymodule error handling in module initialization. (GH-17039)</title>
<updated>2019-11-15T08:42:51+00:00</updated>
<author>
<name>Marco Paolini</name>
<email>mpaolini@users.noreply.github.com</email>
</author>
<published>2019-11-15T08:42:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b44ffc8b409fd539c5fb2b79385498e9fe168880'/>
<id>b44ffc8b409fd539c5fb2b79385498e9fe168880</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-38465: Convert the type of exports counters to Py_ssize_t. (GH-16746)</title>
<updated>2019-10-21T06:31:46+00:00</updated>
<author>
<name>Hai Shi</name>
<email>shihai1992@gmail.com</email>
</author>
<published>2019-10-21T06:31:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=06cd5b6acd98205adae1a3ea4223e88f38ad55ab'/>
<id>06cd5b6acd98205adae1a3ea4223e88f38ad55ab</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant check from arraymodule b_getitem (GH-14676)</title>
<updated>2019-07-11T21:57:42+00:00</updated>
<author>
<name>Disconnect3d</name>
<email>dominik.b.czarnota@gmail.com</email>
</author>
<published>2019-07-11T21:57:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=13ab570febac64bb55fb46d866a9ba5a46ab8902'/>
<id>13ab570febac64bb55fb46d866a9ba5a46ab8902</id>
<content type='text'>
The `arraymodule`'s `b_getitem` function returns a `PyLong` converted 
from `arrayobject`'s array, by dereferencing a pointer to `char`.

When the `char` type is `signed char`, the `if (x &gt;= 128) x -= 256;` comparison/code is redundant because a `signed char` will have a value of `[-128, 127]` and so `x` will never be greater or equal than 128.

This check was indeed needed for situations where a given compiler would assume `char` being `unsigned char` which would make `x` in `[0, 256]` range.

However, the check can be removed if we cast the `ob_item` into a signed char pointer (`signed char*`) instead of `char*`.

This PR/commit introduces this change.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `arraymodule`'s `b_getitem` function returns a `PyLong` converted 
from `arrayobject`'s array, by dereferencing a pointer to `char`.

When the `char` type is `signed char`, the `if (x &gt;= 128) x -= 256;` comparison/code is redundant because a `signed char` will have a value of `[-128, 127]` and so `x` will never be greater or equal than 128.

This check was indeed needed for situations where a given compiler would assume `char` being `unsigned char` which would make `x` in `[0, 256]` range.

However, the check can be removed if we cast the `ob_item` into a signed char pointer (`signed char*`) instead of `char*`.

This PR/commit introduces this change.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-37547: add _PyObject_CallMethodOneArg (GH-14685)</title>
<updated>2019-07-11T08:59:05+00:00</updated>
<author>
<name>Jeroen Demeyer</name>
<email>J.Demeyer@UGent.be</email>
</author>
<published>2019-07-11T08:59:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=59ad110d7a7784d53d0b502eebce0346597a6bef'/>
<id>59ad110d7a7784d53d0b502eebce0346597a6bef</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36974: tp_print -&gt; tp_vectorcall_offset and tp_reserved -&gt; tp_as_async (GH-13464)</title>
<updated>2019-05-31T02:13:39+00:00</updated>
<author>
<name>Jeroen Demeyer</name>
<email>J.Demeyer@UGent.be</email>
</author>
<published>2019-05-31T02:13:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=530f506ac91338b55cf2be71b1cdf50cb077512f'/>
<id>530f506ac91338b55cf2be71b1cdf50cb077512f</id>
<content type='text'>
Automatically replace
tp_print -&gt; tp_vectorcall_offset
tp_compare -&gt; tp_as_async
tp_reserved -&gt; tp_as_async
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Automatically replace
tp_print -&gt; tp_vectorcall_offset
tp_compare -&gt; tp_as_async
tp_reserved -&gt; tp_as_async
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36842: Implement PEP 578 (GH-12613)</title>
<updated>2019-05-23T15:45:22+00:00</updated>
<author>
<name>Steve Dower</name>
<email>steve.dower@microsoft.com</email>
</author>
<published>2019-05-23T15:45:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184'/>
<id>b82e17e626f7b1cd98aada0b1ebb65cb9f8fb184</id>
<content type='text'>
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375)</title>
<updated>2019-05-17T07:13:03+00:00</updated>
<author>
<name>Zackery Spytz</name>
<email>zspytz@gmail.com</email>
</author>
<published>2019-05-17T07:13:03+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=14514d9084a40f599c57da853a305aa264562a43'/>
<id>14514d9084a40f599c57da853a305aa264562a43</id>
<content type='text'>
The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.

Co-Authored-By: Martin Panter &lt;vadmium+py@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The final addition (cur += step) may overflow, so use size_t for "cur".
"cur" is always positive (even for negative steps), so it is safe to use
size_t here.

Co-Authored-By: Martin Panter &lt;vadmium+py@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36285: Fix integer overflow in the array module. (GH-12317)</title>
<updated>2019-03-20T19:49:39+00:00</updated>
<author>
<name>sth</name>
<email>sth.dev@tejp.de</email>
</author>
<published>2019-03-20T19:49:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=aa3ecb80416958eb6fe8cc1b0dfbbfdfbcccead1'/>
<id>aa3ecb80416958eb6fe8cc1b0dfbbfdfbcccead1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36048: Use __index__() instead of __int__() for implicit conversion if available. (GH-11952)</title>
<updated>2019-02-25T15:57:58+00:00</updated>
<author>
<name>Serhiy Storchaka</name>
<email>storchaka@gmail.com</email>
</author>
<published>2019-02-25T15:57:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=6a44f6eef3d0958d88882347190b3e2d1222c2e9'/>
<id>6a44f6eef3d0958d88882347190b3e2d1222c2e9</id>
<content type='text'>
Deprecate using the __int__() method in implicit conversions of Python
numbers to C integers.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Deprecate using the __int__() method in implicit conversions of Python
numbers to C integers.</pre>
</div>
</content>
</entry>
</feed>
