Skip to content

Commit 6ca4eb5

Browse files
committed
Can we just always (up)cast pointers to UInt64?
1 parent 2990b77 commit 6ca4eb5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/backtrace.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ NOTE: `f` and all functions reachable from `f` must not contain a yield point.
268268
"""
269269
function withalloca(f, nbytes)
270270
function wrapper(int)
271-
f(Ptr{Cvoid}(int))
271+
f(Ptr{Cvoid}(UInt(int)))
272272
nothing
273273
end
274274
closure = @cfunction($wrapper, Cvoid, (UInt64,))
@@ -288,9 +288,9 @@ function withalloca(f, nbytes)
288288
"entry",
289289
),
290290
Cvoid,
291-
Tuple{Ptr{Cvoid},Int64},
292-
Base.unsafe_convert(Ptr{Cvoid}, closure),
293-
nbytes,
291+
Tuple{UInt64,UInt64},
292+
UInt64(UInt(Base.unsafe_convert(Ptr{Cvoid}, closure))),
293+
UInt64(nbytes),
294294
)
295295
end
296296
end

0 commit comments

Comments
 (0)