@@ -570,6 +570,7 @@ ctrl_get_index(const group_control *g, uint8_t log2size, int pos)
570
570
static void
571
571
dump_dictkeys (PyDictKeysObject * dk )
572
572
{
573
+ #ifdef DEBUG_PYDICT
573
574
fprintf (stderr , "dictkeys object %p\n" , dk );
574
575
fprintf (stderr , " kind=%d\n" , dk -> dk_kind );
575
576
fprintf (stderr , " log2_size=%d\n" , dk -> dk_log2_size + 3 );
@@ -596,6 +597,7 @@ dump_dictkeys(PyDictKeysObject *dk)
596
597
fprintf (stderr , " %d: key=%p h1=%x h2=%02x hash=%lx\n" , i , ep -> me_key , h1 , h2 , ep -> me_hash );
597
598
}
598
599
fprintf (stderr , "\n" );
600
+ #endif
599
601
}
600
602
601
603
int
@@ -3509,11 +3511,13 @@ PyDoc_STRVAR(items__doc__,
3509
3511
PyDoc_STRVAR (values__doc__ ,
3510
3512
"D.values() -> an object providing a view on D's values" );
3511
3513
3514
+ #ifdef DEBUG_PYDICT
3512
3515
static PyObject * dict_dump (PyDictObject * mp , PyObject * notused )
3513
3516
{
3514
3517
dump_dictkeys (mp -> ma_keys );
3515
3518
Py_RETURN_NONE ;
3516
3519
}
3520
+ #endif
3517
3521
3518
3522
static PyMethodDef mapp_methods [] = {
3519
3523
DICT___CONTAINS___METHODDEF
@@ -3540,7 +3544,9 @@ static PyMethodDef mapp_methods[] = {
3540
3544
copy__doc__ },
3541
3545
DICT___REVERSED___METHODDEF
3542
3546
{"__class_getitem__" , Py_GenericAlias , METH_O |METH_CLASS , PyDoc_STR ("See PEP 585" )},
3547
+ #ifdef DEBUG_PYDICT
3543
3548
{"_dump ", (PyCFunction)dict_dump, METH_NOARGS, PyDoc_STR(" internal use only ")},
3549
+ #endif
3544
3550
{NULL , NULL } /* sentinel */
3545
3551
};
3546
3552
0 commit comments