Revert "Replace inline INVALID_HANDLE_VALUE checks with check-invalid-handle calls"
This reverts commit 1e61dbfd2a.
			
			
				fix-linux
			
			
		
							parent
							
								
									8a3b7cbd18
								
							
						
					
					
						commit
						75e98b4bc3
					
				| 
						 | 
					@ -48,7 +48,8 @@ M: windows delete-directory ( path -- )
 | 
				
			||||||
    RemoveDirectory win32-error=0/f ;
 | 
					    RemoveDirectory win32-error=0/f ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: find-first-file ( path WIN32_FIND_DATA -- WIN32_FIND_DATA HANDLE )
 | 
					: find-first-file ( path WIN32_FIND_DATA -- WIN32_FIND_DATA HANDLE )
 | 
				
			||||||
    [ nip ] [ FindFirstFile ] 2bi check-invalid-handle ;
 | 
					    [ nip ] [ FindFirstFile ] 2bi
 | 
				
			||||||
 | 
					    [ INVALID_HANDLE_VALUE = [ win32-error-string throw ] when ] keep ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: find-next-file ( HANDLE WIN32_FIND_DATA -- WIN32_FIND_DATA/f )
 | 
					: find-next-file ( HANDLE WIN32_FIND_DATA -- WIN32_FIND_DATA/f )
 | 
				
			||||||
    [ nip ] [ FindNextFile ] 2bi 0 = [
 | 
					    [ nip ] [ FindNextFile ] 2bi 0 = [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,7 +42,8 @@ TUPLE: windows-file-info < file-info-tuple attributes ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: find-first-file-stat ( path -- WIN32_FIND_DATA )
 | 
					: find-first-file-stat ( path -- WIN32_FIND_DATA )
 | 
				
			||||||
    WIN32_FIND_DATA <struct> [
 | 
					    WIN32_FIND_DATA <struct> [
 | 
				
			||||||
        FindFirstFile check-invalid-handle
 | 
					        FindFirstFile
 | 
				
			||||||
 | 
					        [ INVALID_HANDLE_VALUE = [ win32-error ] when ] keep
 | 
				
			||||||
        FindClose win32-error=0/f
 | 
					        FindClose win32-error=0/f
 | 
				
			||||||
    ] keep ;
 | 
					    ] keep ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue