• Show log

    Commit

  • Hash : 18cf5698
    Author : Patrick Steinhardt
    Date : 2018-12-01T09:37:40

    maps: provide high-level iteration interface
    
    Currently, our headers need to leak some implementation details of maps due to
    their direct use of indices in the implementation of their foreach macros. This
    makes it impossible to completely hide the map structures away, and also makes
    it impossible to include the khash implementation header in the C files of the
    respective map only.
    
    This is now being fixed by providing a high-level iteration interface
    `map_iterate`, which takes as inputs the map that shall be iterated over, an
    iterator as well as the locations where keys and values shall be put into. For
    simplicity's sake, the iterator is a simple `size_t` that shall initialized to
    `0` on the first call. All existing foreach macros are then adjusted to make use
    of this new function.