Skip to content

Commit 8db759c

Browse files
timholysimeonschaub
authored andcommitted
Add typeassert to prevent cconvert invalidation in raw!
1 parent 9498900 commit 8db759c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/REPL/src/Terminals.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ if Sys.iswindows()
130130
t.in_stream, t.out_stream, t.err_stream)
131131
true
132132
else
133-
ccall(:jl_tty_set_mode, Int32, (Ptr{Cvoid},Int32), t.in_stream.handle, raw) != -1
133+
ccall(:jl_tty_set_mode, Int32, (Ptr{Cvoid},Int32), t.in_stream.handle::Ptr{Cvoid}, raw) != -1
134134
end
135135
end
136136
else
137137
function raw!(t::TTYTerminal, raw::Bool)
138138
check_open(t.in_stream)
139-
ccall(:jl_tty_set_mode, Int32, (Ptr{Cvoid},Int32), t.in_stream.handle, raw) != -1
139+
ccall(:jl_tty_set_mode, Int32, (Ptr{Cvoid},Int32), t.in_stream.handle::Ptr{Cvoid}, raw) != -1
140140
end
141141
end
142142

0 commit comments

Comments
 (0)