-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Description
These should probably be #ifndef. In particular, the first would catch #24
Lines 396 to 415 in 11863b2
| #ifdef NDEBUG | |
| static void | |
| _map_node_array_validate(void *o) | |
| { | |
| assert(IS_ARRAY_NODE(o)); | |
| MapNode_Array *node = (MapNode_Array*)(o); | |
| Py_ssize_t i = 0, count = 0; | |
| for (; i < HAMT_ARRAY_NODE_SIZE; i++) { | |
| if (node->a_array[i] != NULL) { | |
| count++; | |
| } | |
| } | |
| assert(count == node->a_count); | |
| } | |
| #define VALIDATE_ARRAY_NODE(NODE) \ | |
| do { _map_node_array_validate(NODE); } while (0); | |
| #else | |
| #define VALIDATE_ARRAY_NODE(NODE) | |
| #endif |
Lines 1112 to 1120 in 11863b2
| #ifdef NDEBUG | |
| /* Ensure that Collision.without implementation | |
| converts to Bitmap nodes itself. | |
| */ | |
| if (IS_COLLISION_NODE(sub_node)) { | |
| assert(map_node_collision_count( | |
| (MapNode_Collision*)sub_node) > 1); | |
| } | |
| #endif |
Lines 2009 to 2018 in 11863b2
| #ifdef NDEBUG | |
| if (IS_COLLISION_NODE(node)) { | |
| assert( | |
| (map_node_collision_count( | |
| (MapNode_Collision*)node)) > 1); | |
| } | |
| else if (IS_ARRAY_NODE(node)) { | |
| assert(((MapNode_Array*)node)->a_count >= 16); | |
| } | |
| #endif |
Lines 2301 to 2304 in 11863b2
| #ifdef NDEBUG | |
| assert(iter->i_level >= 0); | |
| iter->i_nodes[iter->i_level] = NULL; | |
| #endif |
Lines 2338 to 2341 in 11863b2
| #ifdef NDEBUG | |
| assert(iter->i_level >= 0); | |
| iter->i_nodes[iter->i_level] = NULL; | |
| #endif |
Lines 2362 to 2365 in 11863b2
| #ifdef NDEBUG | |
| assert(iter->i_level >= 0); | |
| iter->i_nodes[iter->i_level] = NULL; | |
| #endif |
Lines 2384 to 2387 in 11863b2
| #ifdef NDEBUG | |
| assert(iter->i_level >= 0); | |
| iter->i_nodes[iter->i_level] = NULL; | |
| #endif |
Metadata
Metadata
Assignees
Labels
No labels