File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,15 @@ impl PyObject {
8080 self . get_attr ( attr_name, vm) . map ( |o| vm. is_none ( & o) )
8181 }
8282
83- // get_attribute should be used for full attribute access (usually from user code).
84- #[ cfg_attr( feature = "flame-it" , flame( "PyObjectRef" ) ) ]
8583 pub fn get_attr ( & self , attr_name : impl IntoPyStrRef , vm : & VirtualMachine ) -> PyResult {
8684 let attr_name = attr_name. into_pystr_ref ( vm) ;
85+ self . _get_attr ( attr_name, vm)
86+ }
87+
88+ // get_attribute should be used for full attribute access (usually from user code).
89+ #[ cfg_attr( feature = "flame-it" , flame( "PyObjectRef" ) ) ]
90+ #[ inline]
91+ fn _get_attr ( & self , attr_name : PyStrRef , vm : & VirtualMachine ) -> PyResult {
8792 vm_trace ! ( "object.__getattribute__: {:?} {:?}" , obj, attr_name) ;
8893 let getattro = self
8994 . class ( )
@@ -290,6 +295,7 @@ impl PyObject {
290295 _ => Err ( vm. new_unsupported_binop_error ( self , other, op. operator_token ( ) ) ) ,
291296 }
292297 }
298+ #[ inline( always) ]
293299 pub fn rich_compare_bool (
294300 & self ,
295301 other : & Self ,
You can’t perform that action at this time.
0 commit comments