File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,17 @@ fn object_str(vm: &mut VirtualMachine, args: PyFuncArgs) -> PyResult {
5959pub fn init ( context : & PyContext ) {
6060 let ref object = context. object ;
6161 object. set_attr ( "__new__" , context. new_rustfunc ( new_instance) ) ;
62+ object. set_attr ( "__init__" , context. new_rustfunc ( object_init) ) ;
6263 object. set_attr ( "__eq__" , context. new_rustfunc ( object_eq) ) ;
6364 object. set_attr ( "__ne__" , context. new_rustfunc ( object_ne) ) ;
6465 object. set_attr ( "__dict__" , context. new_member_descriptor ( object_dict) ) ;
6566 object. set_attr ( "__str__" , context. new_rustfunc ( object_str) ) ;
6667}
6768
69+ fn object_init ( vm : & mut VirtualMachine , _args : PyFuncArgs ) -> PyResult {
70+ Ok ( vm. ctx . none ( ) )
71+ }
72+
6873fn object_dict ( vm : & mut VirtualMachine , args : PyFuncArgs ) -> PyResult {
6974 match args. args [ 0 ] . borrow ( ) . kind {
7075 PyObjectKind :: Class { ref dict, .. } => Ok ( dict. clone ( ) ) ,
You can’t perform that action at this time.
0 commit comments