make a struct for dirents on linux, not a <c-object>
parent
14973eacb5
commit
d8be0561fb
|
@ -1,10 +1,11 @@
|
|||
! Copyright (C) 2009 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: alien.c-types io.directories.unix kernel system unix ;
|
||||
USING: alien.c-types io.directories.unix kernel system unix
|
||||
classes.struct ;
|
||||
IN: io.directories.unix.linux
|
||||
|
||||
M: unix find-next-file ( DIR* -- byte-array )
|
||||
"dirent" <c-object>
|
||||
M: unix find-next-file ( DIR* -- dirent )
|
||||
dirent <struct>
|
||||
f <void*>
|
||||
[ readdir64_r 0 = [ (io-error) ] unless ] 2keep
|
||||
*void* [ drop f ] unless ;
|
||||
|
|
Loading…
Reference in New Issue