File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333#include "py/misc.h"
3434#include "py/runtime.h"
3535
36+ #if MICROPY_DEBUG_VERBOSE // print debugging info
37+ #define DEBUG_PRINT (1)
38+ #else // don't print debugging info
39+ #define DEBUG_PRINT (0)
40+ #define DEBUG_printf (...) (void)0
41+ #endif
42+
3643// Fixed empty map. Useful when need to call kw-receiving functions
3744// without any keywords from C, etc.
3845const mp_map_t mp_const_empty_map = {
@@ -114,6 +121,7 @@ void mp_map_clear(mp_map_t *map) {
114121STATIC void mp_map_rehash (mp_map_t * map ) {
115122 size_t old_alloc = map -> alloc ;
116123 size_t new_alloc = get_hash_alloc_greater_or_equal_to (map -> alloc + 1 );
124+ DEBUG_printf ("mp_map_rehash(%p): " UINT_FMT " -> " UINT_FMT "\n" , map , old_alloc , new_alloc );
117125 mp_map_elem_t * old_table = map -> table ;
118126 mp_map_elem_t * new_table = m_new0 (mp_map_elem_t , new_alloc );
119127 // If we reach this point, table resizing succeeded, now we can edit the old map.
You can’t perform that action at this time.
0 commit comments