@@ -93,11 +93,11 @@ static PyTypeObject *type_list;
9393 is set, they will be removed from the type_list
9494 once the last object is deallocated. */
9595static int unlist_types_without_objects ;
96- extern Py_ssize_t tuple_zero_allocs , fast_tuple_allocs ;
97- extern Py_ssize_t quick_int_allocs , quick_neg_int_allocs ;
98- extern Py_ssize_t null_strings , one_strings ;
96+ extern Py_ssize_t _Py_tuple_zero_allocs , _Py_fast_tuple_allocs ;
97+ extern Py_ssize_t _Py_quick_int_allocs , _Py_quick_neg_int_allocs ;
98+ extern Py_ssize_t _Py_null_strings , _Py_one_strings ;
9999void
100- dump_counts (FILE * f )
100+ _Py_dump_counts (FILE * f )
101101{
102102 PyInterpreterState * interp = _PyInterpreterState_Get ();
103103 if (!interp -> core_config .show_alloc_count ) {
@@ -113,17 +113,17 @@ dump_counts(FILE* f)
113113 tp -> tp_maxalloc );
114114 fprintf (f , "fast tuple allocs: %" PY_FORMAT_SIZE_T "d, "
115115 "empty: %" PY_FORMAT_SIZE_T "d\n" ,
116- fast_tuple_allocs , tuple_zero_allocs );
116+ _Py_fast_tuple_allocs , _Py_tuple_zero_allocs );
117117 fprintf (f , "fast int allocs: pos: %" PY_FORMAT_SIZE_T "d, "
118118 "neg: %" PY_FORMAT_SIZE_T "d\n" ,
119- quick_int_allocs , quick_neg_int_allocs );
119+ _Py_quick_int_allocs , _Py_quick_neg_int_allocs );
120120 fprintf (f , "null strings: %" PY_FORMAT_SIZE_T "d, "
121121 "1-strings: %" PY_FORMAT_SIZE_T "d\n" ,
122- null_strings , one_strings );
122+ _Py_null_strings , _Py_one_strings );
123123}
124124
125125PyObject *
126- get_counts (void )
126+ _Py_get_counts (void )
127127{
128128 PyTypeObject * tp ;
129129 PyObject * result ;
@@ -150,12 +150,12 @@ get_counts(void)
150150}
151151
152152void
153- inc_count (PyTypeObject * tp )
153+ _Py_inc_count (PyTypeObject * tp )
154154{
155155 if (tp -> tp_next == NULL && tp -> tp_prev == NULL ) {
156156 /* first time; insert in linked list */
157157 if (tp -> tp_next != NULL ) /* sanity check */
158- Py_FatalError ("XXX inc_count sanity check" );
158+ Py_FatalError ("XXX _Py_inc_count sanity check" );
159159 if (type_list )
160160 type_list -> tp_prev = tp ;
161161 tp -> tp_next = type_list ;
@@ -181,7 +181,7 @@ inc_count(PyTypeObject *tp)
181181 tp -> tp_maxalloc = tp -> tp_allocs - tp -> tp_frees ;
182182}
183183
184- void dec_count (PyTypeObject * tp )
184+ void _Py_dec_count (PyTypeObject * tp )
185185{
186186 tp -> tp_frees ++ ;
187187 if (unlist_types_without_objects &&
0 commit comments