@@ -2946,7 +2946,7 @@ impl<T: PyPayload> PyRef<T> {
29462946impl < T : PyPayload + crate :: object:: MaybeTraverse + core:: fmt:: Debug > PyRef < T > {
29472947 #[ inline( always) ]
29482948 pub fn new_ref ( payload : T , typ : crate :: builtins:: PyTypeRef , dict : Option < PyDictRef > ) -> Self {
2949- Self :: new_ref_with_collection ( payload, typ, dict, true )
2949+ Self :: new_ref_impl ( payload, typ, dict, true )
29502950 }
29512951
29522952 /// Allocate and track internal storage without running collection during
@@ -2966,15 +2966,15 @@ impl<T: PyPayload + crate::object::MaybeTraverse + core::fmt::Debug> PyRef<T> {
29662966 typ : crate :: builtins:: PyTypeRef ,
29672967 dict : Option < PyDictRef > ,
29682968 ) -> Self {
2969- Self :: new_ref_with_collection ( payload, typ, dict, false )
2969+ Self :: new_ref_impl ( payload, typ, dict, false )
29702970 }
29712971
29722972 #[ inline( always) ]
2973- fn new_ref_with_collection (
2973+ fn new_ref_impl (
29742974 payload : T ,
29752975 typ : crate :: builtins:: PyTypeRef ,
29762976 dict : Option < PyDictRef > ,
2977- collect : bool ,
2977+ allow_collection : bool ,
29782978 ) -> Self {
29792979 let has_dict = dict. is_some ( ) ;
29802980 let is_heaptype = typ. heaptype_ext . is_some ( ) ;
@@ -3021,7 +3021,7 @@ impl<T: PyPayload + crate::object::MaybeTraverse + core::fmt::Debug> PyRef<T> {
30213021 // Tracks under the interpreter running now and, when allowed,
30223022 // collects if this allocation pushed gen0 past its threshold.
30233023 unsafe {
3024- crate :: gc_state:: track_new_object_with_collection ( ptr. cast ( ) , collect ) ;
3024+ crate :: gc_state:: track_new_object_impl ( ptr. cast ( ) , allow_collection ) ;
30253025 }
30263026 }
30273027
0 commit comments