@@ -1148,29 +1148,6 @@ PyUnicode_RPartition(PyObject *str_obj, PyObject *sep_obj)
11481148}
11491149
11501150
1151- #ifdef Py_DEBUG
1152- /* Functions wrapping macros for use in debugger */
1153- const char * _PyUnicode_utf8 (void * unicode_raw ){
1154- PyObject * unicode = _PyObject_CAST (unicode_raw );
1155- return PyUnicode_UTF8 (unicode );
1156- }
1157-
1158- const void * _PyUnicode_compact_data (void * unicode_raw ) {
1159- PyObject * unicode = _PyObject_CAST (unicode_raw );
1160- return _PyUnicode_COMPACT_DATA (unicode );
1161- }
1162- const void * _PyUnicode_data (void * unicode_raw ) {
1163- PyObject * unicode = _PyObject_CAST (unicode_raw );
1164- printf ("obj %p\n" , (void * )unicode );
1165- printf ("compact %d\n" , PyUnicode_IS_COMPACT (unicode ));
1166- printf ("compact ascii %d\n" , PyUnicode_IS_COMPACT_ASCII (unicode ));
1167- printf ("ascii op %p\n" , (void * )(_PyASCIIObject_CAST (unicode ) + 1 ));
1168- printf ("compact op %p\n" , (void * )(_PyCompactUnicodeObject_CAST (unicode ) + 1 ));
1169- printf ("compact data %p\n" , _PyUnicode_COMPACT_DATA (unicode ));
1170- return PyUnicode_DATA (unicode );
1171- }
1172-
1173-
11741151static const char *
11751152unicode_kind_name (PyObject * unicode )
11761153{
@@ -1209,6 +1186,29 @@ unicode_kind_name(PyObject *unicode)
12091186}
12101187
12111188
1189+ #ifdef Py_DEBUG
1190+ /* Functions wrapping macros for use in debugger */
1191+ const char * _PyUnicode_utf8 (void * unicode_raw ){
1192+ PyObject * unicode = _PyObject_CAST (unicode_raw );
1193+ return PyUnicode_UTF8 (unicode );
1194+ }
1195+
1196+ const void * _PyUnicode_compact_data (void * unicode_raw ) {
1197+ PyObject * unicode = _PyObject_CAST (unicode_raw );
1198+ return _PyUnicode_COMPACT_DATA (unicode );
1199+ }
1200+ const void * _PyUnicode_data (void * unicode_raw ) {
1201+ PyObject * unicode = _PyObject_CAST (unicode_raw );
1202+ printf ("obj %p\n" , (void * )unicode );
1203+ printf ("compact %d\n" , PyUnicode_IS_COMPACT (unicode ));
1204+ printf ("compact ascii %d\n" , PyUnicode_IS_COMPACT_ASCII (unicode ));
1205+ printf ("ascii op %p\n" , (void * )(_PyASCIIObject_CAST (unicode ) + 1 ));
1206+ printf ("compact op %p\n" , (void * )(_PyCompactUnicodeObject_CAST (unicode ) + 1 ));
1207+ printf ("compact data %p\n" , _PyUnicode_COMPACT_DATA (unicode ));
1208+ return PyUnicode_DATA (unicode );
1209+ }
1210+
1211+
12121212void
12131213_PyUnicode_Dump (PyObject * op )
12141214{
0 commit comments