Skip to content

Commit 8953b22

Browse files
committed
up
1 parent 31dd807 commit 8953b22

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

base/file.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,17 +530,17 @@ function tempname(parent::AbstractString=tempdir(); cleanup::Bool=true)
530530
RPC_S_OUT_OF_MEMORY = 14
531531

532532
id = Ref{GUID}()
533-
r = ccall((:UuidCreate,:Rpcrt4), Cint, (Ref{GUID},), id)
533+
r = ccall((:UuidCreate,:Rpcrt4), stdcall, Cint, (Ref{GUID},), id)
534534
(r == 0 || r == RPC_S_UUID_LOCAL_ONLY) || (r == RPC_S_UUID_NO_ADDRESS && error("Cannot get Ethernet or token-ring hardware address for this computer."))
535535

536536
nameptr = Ref{Ptr{Cwchar_t}}()
537-
r = ccall((:UuidToStringW, :Rpcrt4), Cint, (Ref{GUID}, Ref{Ptr{Cwchar_t}}), id, nameptr)
537+
r = ccall((:UuidToStringW, :Rpcrt4), stdcall, Cint, (Ref{GUID}, Ref{Ptr{Cwchar_t}}), id, nameptr)
538538
r == 0 || (r == RPC_S_OUT_OF_MEMORY && error("Out of memory")) || error("cannot convert UIUD to string")
539539

540-
namebuf = unsafe_wrap(Vector{Cwchar_t}, nameptr[], ccall(:wcslen, UInt, (Ptr{Cwchar_t},), nameptr[]))
540+
namebuf = unsafe_wrap(Vector{Cwchar_t}, stdcall, nameptr[], ccall(:wcslen, UInt, (Ptr{Cwchar_t},), nameptr[]))
541541
name = transcode(String, namebuf)
542542

543-
@assert ccall((:RpcStringFreeW, :Rpcrt4), Cint, (Ref{Ptr{Cwchar_t}},), nameptr) == 0
543+
ccall((:RpcStringFreeW, :Rpcrt4), Cint, (Ref{Ptr{Cwchar_t}},), nameptr) == 0
544544

545545
filename = joinpath(parent, temp_prefix * name)
546546
if !cleanup

test/file.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ end
5151
using Random
5252

5353
@testset "that temp names are actually unique" begin
54-
temps = [tempname(cleanup=false) for _ = 1:1000]
54+
temps = [tempname(cleanup=false) for _ = 1:100]
5555
@test allunique(temps)
56-
temps = map(1:1000) do _
56+
temps = map(1:100) do _
5757
path, io = mktemp(cleanup=false)
5858
close(io)
5959
return path

0 commit comments

Comments
 (0)