[issue28077] Fix find_empty_slot in dictobject

2016-09-13 Thread STINNER Victor
STINNER Victor added the comment: > Victor committed the patch in msg276042 in 579141d6e353. Well, my change is a little bit different than find_empty_slot.patch. I removed the return value and I kept "ep = &ep0[mp->ma_keys->dk_nentries];". -- ___ P

[issue28077] Fix find_empty_slot in dictobject

2016-09-13 Thread Berker Peksag
Berker Peksag added the comment: Victor committed the patch in msg276042 in 579141d6e353. -- nosy: +berker.peksag ___ Python tracker ___ _

[issue28077] Fix find_empty_slot in dictobject

2016-09-13 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: fixed -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread Xiang Zhang
Xiang Zhang added the comment: Just need to delete the lines :) : diff -r 0773e5cb8608 Objects/dictobject.c --- a/Objects/dictobject.c Mon Sep 12 14:43:14 2016 +0200 +++ b/Objects/dictobject.c Mon Sep 12 21:26:41 2016 +0800 @@ -1011,10 +1011,7 @@ ep = &ep0[mp->ma_keys->dk_nentries

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread STINNER Victor
STINNER Victor added the comment: > And hapyo, if you decide to make find_empty_slot support only combined dict, > why not remove mp_values check? Oh, I didn't notice that find_empty_slot() partially support split tables. Would you like to write a patch? I reopen the issue to fix this nit ;-)

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread Xiang Zhang
Xiang Zhang added the comment: mp_values should be mp->ma_values, sorry. -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread Xiang Zhang
Xiang Zhang added the comment: Yes. It cannot be hit and I want to remove it at first. But I decide not to do that since there is no clue in the future find_empty_slot will not be used against split dict. And hapyo, if you decide to make find_empty_slot support only combined dict, why not rem

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread STINNER Victor
STINNER Victor added the comment: > find_empty_slot will also do *value_addr = &mp->ma_values[-1] if it > encounters a split dict. I checked just before Naoki comment the issue, but I have the same conclusion: find_empty_slot() is never called on a split table. By the way, we might modify fin

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e986b81cc1c by Victor Stinner in branch 'default': Issue #28077: find_empty_slot() only supports combined dict https://hg.python.org/cpython/rev/0e986b81cc1c -- nosy: +python-dev ___ Python tracker

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread INADA Naoki
INADA Naoki added the comment: It cannot hit from Python. The function never called for split table, since resize function combine split table. So we can just comment the function supports only combined table. -- ___ Python tracker

[issue28077] Fix find_empty_slot in dictobject

2016-09-12 Thread STINNER Victor
STINNER Victor added the comment: Hum, I understand that it's a bug, so do you know how to reproduce the bug from a pure Python script? If yes, it would be nice to include an unit test. -- ___ Python tracker _

[issue28077] Fix find_empty_slot in dictobject

2016-09-11 Thread Xiang Zhang
New submission from Xiang Zhang: find_empty_slot will also do *value_addr = &mp->ma_values[-1] if it encounters a split dict. -- components: Interpreter Core files: find_empty_slot.patch keywords: patch messages: 275800 nosy: haypo, methane, xiang.zhang priority: normal severity: normal