@@ -329,13 +329,15 @@ _objsnapshot_clear(_objsnapshot *osn) |
|
|
329 |
329 |
// PyMem_Free(osn); |
330 |
330 |
//} |
331 |
331 |
|
|
332 |
+#ifndef NDEBUG |
332 |
333 |
static int |
333 |
334 |
_objsnapshot_is_clear(_objsnapshot *osn) |
334 |
335 |
{ |
335 |
336 |
return osn->serialized == NULL |
336 |
337 |
&& _rawstring_is_clear(&osn->modname) |
337 |
338 |
&& _rawstring_is_clear(&osn->clsname); |
338 |
339 |
} |
|
340 |
+#endif |
339 |
341 |
|
340 |
342 |
static void |
341 |
343 |
_objsnapshot_summarize(_objsnapshot *osn, _rawstring *rawbuf, const char *msg) |
@@ -597,13 +599,15 @@ _tbsnapshot_free(_tbsnapshot *tbs) |
|
|
597 |
599 |
PyMem_Free(tbs); |
598 |
600 |
} |
599 |
601 |
|
|
602 |
+#ifndef NDEBUG |
600 |
603 |
static int |
601 |
604 |
_tbsnapshot_is_clear(_tbsnapshot *tbs) |
602 |
605 |
{ |
603 |
606 |
return tbs->tbs_lineno == -1 && tbs->tbs_next == NULL |
604 |
607 |
&& _rawstring_is_clear(&tbs->tbs_funcname) |
605 |
608 |
&& _rawstring_is_clear(&tbs->tbs_filename); |
606 |
609 |
} |
|
610 |
+#endif |
607 |
611 |
|
608 |
612 |
static int |
609 |
613 |
_tbsnapshot_from_pytb(_tbsnapshot *tbs, PyTracebackObject *pytb) |
@@ -748,6 +752,7 @@ _excsnapshot_free(_excsnapshot *es) |
|
|
748 |
752 |
PyMem_Free(es); |
749 |
753 |
} |
750 |
754 |
|
|
755 |
+#ifndef NDEBUG |
751 |
756 |
static int |
752 |
757 |
_excsnapshot_is_clear(_excsnapshot *es) |
753 |
758 |
{ |
@@ -758,6 +763,7 @@ _excsnapshot_is_clear(_excsnapshot *es) |
|
|
758 |
763 |
&& es->es_msg == NULL |
759 |
764 |
&& _objsnapshot_is_clear(&es->es_object); |
760 |
765 |
} |
|
766 |
+#endif |
761 |
767 |
|
762 |
768 |
static PyObject * |
763 |
769 |
_excsnapshot_get_exc_naive(_excsnapshot *es) |
@@ -1085,13 +1091,15 @@ _sharedexception_free(_sharedexception *she) |
|
|
1085 |
1091 |
PyMem_Free(she); |
1086 |
1092 |
} |
1087 |
1093 |
|
|
1094 |
+#ifndef NDEBUG |
1088 |
1095 |
static int |
1089 |
1096 |
_sharedexception_is_clear(_sharedexception *she) |
1090 |
1097 |
{ |
1091 |
1098 |
return 1 |
1092 |
1099 |
&& _excsnapshot_is_clear(&she->snapshot) |
1093 |
1100 |
&& _rawstring_is_clear(&she->msg); |
1094 |
1101 |
} |
|
1102 |
+#endif |
1095 |
1103 |
|
1096 |
1104 |
static PyObject * |
1097 |
1105 |
_sharedexception_get_cause(_sharedexception *sharedexc) |