mirror of
https://github.com/carp-lang/Carp.git
synced 2024-09-11 05:25:28 +03:00
fix: use non-deprecated unlink function on windows (#1311)
This commit is contained in:
parent
a4f8041288
commit
5a449b0919
@ -56,6 +56,9 @@ module are wrappers around the C standard library.")
|
||||
(private unlink-)
|
||||
(hidden unlink-)
|
||||
(register unlink- (Fn [(Ptr CChar)] Int) "unlink")
|
||||
(windows-only
|
||||
; override unlink for windows
|
||||
(register unlink- (Fn [(Ptr CChar)] Int) "_unlink"))
|
||||
(doc unlink "unlinks a file, i.e. deletes it (thin wrapper for POSIX api in <unistd.h>).")
|
||||
(defn unlink [file-name]
|
||||
(unlink- (String.cstr file-name)) )
|
||||
|
Loading…
Reference in New Issue
Block a user