File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 33
33
#include "py/misc.h"
34
34
#include "py/runtime.h"
35
35
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
+
36
43
// Fixed empty map. Useful when need to call kw-receiving functions
37
44
// without any keywords from C, etc.
38
45
const mp_map_t mp_const_empty_map = {
@@ -114,6 +121,7 @@ void mp_map_clear(mp_map_t *map) {
114
121
STATIC void mp_map_rehash (mp_map_t * map ) {
115
122
size_t old_alloc = map -> alloc ;
116
123
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 );
117
125
mp_map_elem_t * old_table = map -> table ;
118
126
mp_map_elem_t * new_table = m_new0 (mp_map_elem_t , new_alloc );
119
127
// 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