@@ -897,7 +897,7 @@ mod array {
897897 let bytes = bytes. get_bytes ( ) ;
898898
899899 for b in bytes. chunks ( BLOCKSIZE ) {
900- let b = PyBytes :: from ( b. to_vec ( ) ) . into_ref ( vm ) ;
900+ let b = PyBytes :: from ( b. to_vec ( ) ) . into_ref ( & vm . ctx ) ;
901901 vm. call_method ( & f, "write" , ( b, ) ) ?;
902902 }
903903 Ok ( ( ) )
@@ -1017,7 +1017,7 @@ mod array {
10171017 if let Some ( other) = other. payload :: < PyArray > ( ) {
10181018 self . read ( )
10191019 . add ( & * other. read ( ) , vm)
1020- . map ( |array| PyArray :: from ( array) . into_ref ( vm ) )
1020+ . map ( |array| PyArray :: from ( array) . into_ref ( & vm . ctx ) )
10211021 } else {
10221022 Err ( vm. new_type_error ( format ! (
10231023 "can only append array (not \" {}\" ) to array" ,
@@ -1050,7 +1050,7 @@ mod array {
10501050 fn mul ( & self , value : isize , vm : & VirtualMachine ) -> PyResult < PyRef < Self > > {
10511051 self . read ( )
10521052 . mul ( value, vm)
1053- . map ( |x| Self :: from ( x) . into_ref ( vm ) )
1053+ . map ( |x| Self :: from ( x) . into_ref ( & vm . ctx ) )
10541054 }
10551055
10561056 #[ pymethod( magic) ]
@@ -1444,7 +1444,7 @@ mod array {
14441444 }
14451445
14461446 fn check_array_type ( typ : PyTypeRef , vm : & VirtualMachine ) -> PyResult < PyTypeRef > {
1447- if !typ. fast_issubclass ( PyArray :: class ( vm ) ) {
1447+ if !typ. fast_issubclass ( PyArray :: class ( & vm . ctx ) ) {
14481448 return Err (
14491449 vm. new_type_error ( format ! ( "{} is not a subtype of array.array" , typ. name( ) ) )
14501450 ) ;
0 commit comments