Skip to content
  • Paul Sokolovsky's avatar
    py: Fix dict.copy() and low-level map/set allocation. · 5fedd0c3
    Paul Sokolovsky authored
    Two things: 1) set flags in copy properly; make mp_map_init() not be too
    smart and do something with requested alloc size. Policy of using prime
    numbers for alloc size is high-level policy which should be applied at
    corresponding high levels. Low-level functions should just do what they're
    asked to, because they don't have enough context to be smarter than that.
    For example, munging with alloc size of course breaks dict copying (as
    changing sizes requires rehashing).
    5fedd0c3