{"action":"created","issue":{"url":"https://api.github.com/repos/cython/cython/issues/340","repository_url":"https://api.github.com/repos/cython/cython","labels_url":"https://api.github.com/repos/cython/cython/issues/340/labels{/name}","comments_url":"https://api.github.com/repos/cython/cython/issues/340/comments","events_url":"https://api.github.com/repos/cython/cython/issues/340/events","html_url":"https://github.com/cython/cython/pull/340","id":51609538,"number":340,"title":"fix shrinking and overflow in cpython.array","user":{"login":"larsmans","id":335383,"avatar_url":"https://avatars.githubusercontent.com/u/335383?v=3","gravatar_id":"","url":"https://api.github.com/users/larsmans","html_url":"https://github.com/larsmans","followers_url":"https://api.github.com/users/larsmans/followers","following_url":"https://api.github.com/users/larsmans/following{/other_user}","gists_url":"https://api.github.com/users/larsmans/gists{/gist_id}","starred_url":"https://api.github.com/users/larsmans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsmans/subscriptions","organizations_url":"https://api.github.com/users/larsmans/orgs","repos_url":"https://api.github.com/users/larsmans/repos","events_url":"https://api.github.com/users/larsmans/events{/privacy}","received_events_url":"https://api.github.com/users/larsmans/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2014-12-10T20:52:40Z","updated_at":"2016-10-18T18:11:33Z","closed_at":"2014-12-19T16:53:30Z","pull_request":{"url":"https://api.github.com/repos/cython/cython/pulls/340","html_url":"https://github.com/cython/cython/pull/340","diff_url":"https://github.com/cython/cython/pull/340.diff","patch_url":"https://github.com/cython/cython/pull/340.patch"},"body":"I found two bugs in `cpython.array.resize_smart`:\r\n\r\n* it's impossible to shrink the array, except to a size that is less then ¼ of the current size (in fact the array may grow when shrinking by a few elements is requested);\r\n* the calculation of `newsize` could overflow.\r\n\r\nThis patch fixes both bugs. I took the easy way out: never actually shrink the allocation, just decrease the size."},"comment":{"url":"https://api.github.com/repos/cython/cython/issues/comments/254591752","html_url":"https://github.com/cython/cython/pull/340#issuecomment-254591752","issue_url":"https://api.github.com/repos/cython/cython/issues/340","id":254591752,"user":{"login":"robertwb","id":486017,"avatar_url":"https://avatars.githubusercontent.com/u/486017?v=3","gravatar_id":"","url":"https://api.github.com/users/robertwb","html_url":"https://github.com/robertwb","followers_url":"https://api.github.com/users/robertwb/followers","following_url":"https://api.github.com/users/robertwb/following{/other_user}","gists_url":"https://api.github.com/users/robertwb/gists{/gist_id}","starred_url":"https://api.github.com/users/robertwb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertwb/subscriptions","organizations_url":"https://api.github.com/users/robertwb/orgs","repos_url":"https://api.github.com/users/robertwb/repos","events_url":"https://api.github.com/users/robertwb/events{/privacy}","received_events_url":"https://api.github.com/users/robertwb/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T18:11:33Z","updated_at":"2016-10-18T18:11:33Z","body":"This seemse to have caused https://github.com/cython/cython/issues/1492"}}
{"actor":{"display_login":"robertwb"}}