@@ -22,14 +22,14 @@ use xxhash_rust::const_xxh3::xxh3_128;
2222
2323use crate :: {
2424 ChildTermination , TrackedChild ,
25+ artifact:: Artifact ,
2526 command:: Command ,
2627 error:: SpawnError ,
27- fixture:: Fixture ,
2828 ipc:: { OwnedReceiverLockGuard , SHM_CAPACITY } ,
2929} ;
3030
3131const PRELOAD_CDYLIB_BINARY : & [ u8 ] = include_bytes ! ( env!( "CARGO_CDYLIB_FILE_FSPY_PRELOAD_WINDOWS" ) ) ;
32- const INTERPOSE_CDYLIB : Fixture = Fixture :: new (
32+ const INTERPOSE_CDYLIB : Artifact = Artifact :: new (
3333 "fsyp_preload" ,
3434 PRELOAD_CDYLIB_BINARY ,
3535 formatcp ! ( "{:x}" , xxh3_128( PRELOAD_CDYLIB_BINARY ) ) ,
@@ -52,27 +52,27 @@ impl PathAccessIterable {
5252
5353#[ derive( Debug , Clone ) ]
5454pub struct SpyImpl {
55- asni_dll_path_with_nul : Arc < CStr > ,
55+ ansi_dll_path_with_nul : Arc < CStr > ,
5656}
5757
5858impl SpyImpl {
5959 pub fn init_in ( path : & Path ) -> io:: Result < Self > {
6060 let dll_path = INTERPOSE_CDYLIB . write_to ( & path, ".dll" ) . unwrap ( ) ;
6161
6262 let wide_dll_path = dll_path. as_os_str ( ) . encode_wide ( ) . collect :: < Vec < u16 > > ( ) ;
63- let mut asni_dll_path =
63+ let mut ansi_dll_path =
6464 winsafe:: WideCharToMultiByte ( CP :: ACP , WC :: NoValue , & wide_dll_path, None , None )
6565 . map_err ( |err| io:: Error :: from_raw_os_error ( err. raw ( ) as i32 ) ) ?;
6666
67- asni_dll_path . push ( 0 ) ;
67+ ansi_dll_path . push ( 0 ) ;
6868
69- let asni_dll_path_with_nul =
70- unsafe { CStr :: from_bytes_with_nul_unchecked ( asni_dll_path . as_slice ( ) ) } ;
71- Ok ( Self { asni_dll_path_with_nul : asni_dll_path_with_nul . into ( ) } )
69+ let ansi_dll_path_with_nul =
70+ unsafe { CStr :: from_bytes_with_nul_unchecked ( ansi_dll_path . as_slice ( ) ) } ;
71+ Ok ( Self { ansi_dll_path_with_nul : ansi_dll_path_with_nul . into ( ) } )
7272 }
7373
7474 pub ( crate ) async fn spawn ( & self , command : Command ) -> Result < TrackedChild , SpawnError > {
75- let asni_dll_path_with_nul = Arc :: clone ( & self . asni_dll_path_with_nul ) ;
75+ let ansi_dll_path_with_nul = Arc :: clone ( & self . ansi_dll_path_with_nul ) ;
7676 let mut command = command. into_tokio_command ( ) ;
7777
7878 command. creation_flags ( CREATE_SUSPENDED ) ;
@@ -87,7 +87,7 @@ impl SpyImpl {
8787 let std_child = std_command. spawn ( ) ?;
8888 * spawn_success = true ;
8989
90- let mut dll_paths = asni_dll_path_with_nul . as_ptr ( ) . cast :: < c_char > ( ) ;
90+ let mut dll_paths = ansi_dll_path_with_nul . as_ptr ( ) . cast :: < c_char > ( ) ;
9191 let process_handle = std_child. as_raw_handle ( ) . cast :: < winapi:: ctypes:: c_void > ( ) ;
9292 let success =
9393 unsafe { DetourUpdateProcessWithDll ( process_handle, & mut dll_paths, 1 ) } ;
@@ -97,7 +97,7 @@ impl SpyImpl {
9797
9898 let payload = Payload {
9999 channel_conf : channel_conf. clone ( ) ,
100- asni_dll_path_with_nul : asni_dll_path_with_nul . to_bytes ( ) ,
100+ ansi_dll_path_with_nul : ansi_dll_path_with_nul . to_bytes ( ) ,
101101 } ;
102102 let payload_bytes = bincode:: encode_to_vec ( payload, BINCODE_CONFIG ) . unwrap ( ) ;
103103 let success = unsafe {
0 commit comments