@@ -31,17 +31,16 @@ pub(crate) fn make_module(vm: &VirtualMachine) -> PyObjectRef {
31
31
pub mod module {
32
32
use crate :: {
33
33
builtins:: { int, PyDictRef , PyInt , PyListRef , PyStrRef , PyTupleRef , PyTypeRef } ,
34
- crt_fd:: Offset ,
35
34
exceptions:: IntoPyException ,
36
- function:: { FuncArgs , OptionalArg } ,
35
+ function:: OptionalArg ,
37
36
slots:: SlotConstructor ,
38
37
stdlib:: os:: {
39
38
errno_err, DirFd , FollowSymlinks , PathOrFd , PyPathLike , SupportFunc , TargetIsDirectory ,
40
39
_os, fs_metadata,
41
40
} ,
42
41
utils:: { Either , ToCString } ,
43
- IntoPyObject , ItemProtocol , PyObjectRef , PyResult , PyValue , StaticType ,
44
- TryFromBorrowedObject , TryFromObject , VirtualMachine ,
42
+ IntoPyObject , ItemProtocol , PyObjectRef , PyResult , PyValue , StaticType , TryFromObject ,
43
+ VirtualMachine ,
45
44
} ;
46
45
use bitflags:: bitflags;
47
46
use nix:: fcntl;
@@ -963,6 +962,8 @@ pub mod module {
963
962
#[ cfg( any( target_os = "linux" , target_os = "freebsd" , target_os = "macos" ) ) ]
964
963
impl PosixSpawnArgs {
965
964
fn spawn ( self , spawnp : bool , vm : & VirtualMachine ) -> PyResult < libc:: pid_t > {
965
+ use crate :: TryFromBorrowedObject ;
966
+
966
967
let path = CString :: new ( self . path . into_bytes ( ) )
967
968
. map_err ( |_| vm. new_value_error ( "path should not have nul bytes" . to_owned ( ) ) ) ?;
968
969
@@ -983,7 +984,7 @@ pub mod module {
983
984
let id = PosixSpawnFileActionIdentifier :: try_from ( id) . map_err ( |_| {
984
985
vm. new_type_error ( "Unknown file_actions identifier" . to_owned ( ) )
985
986
} ) ?;
986
- let args = FuncArgs :: from ( args. to_vec ( ) ) ;
987
+ let args: crate :: function :: FuncArgs = args. to_vec ( ) . into ( ) ;
987
988
let ret = match id {
988
989
PosixSpawnFileActionIdentifier :: Open => {
989
990
let ( fd, path, oflag, mode) : ( _ , PyPathLike , _ , _ ) = args. bind ( vm) ?;
@@ -1567,7 +1568,7 @@ pub mod module {
1567
1568
#[ pyarg( any) ]
1568
1569
in_fd : i32 ,
1569
1570
#[ pyarg( any) ]
1570
- offset : Offset ,
1571
+ offset : crate :: crt_fd :: Offset ,
1571
1572
#[ pyarg( any) ]
1572
1573
count : i64 ,
1573
1574
#[ cfg( target_os = "macos" ) ]
0 commit comments