We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47dc548 commit 459a79fCopy full SHA for 459a79f
src/JlWrap/io.jl
@@ -10,7 +10,7 @@ pyjlio_closed(io::IO) = Py(!isopen(io))
10
pyjl_handle_error_type(::typeof(pyjlio_closed), io, exc) =
11
exc isa MethodError && exc.f === isopen ? pybuiltins.ValueError : PyNULL
12
13
-pyjlio_fileno(io::IO) = Py(fd(io))
+pyjlio_fileno(io::IO) = Py(Base.cconvert(Cint, fd(io))::Cint)
14
pyjl_handle_error_type(::typeof(pyjlio_fileno), io, exc) =
15
exc isa MethodError && exc.f === fd ? pybuiltins.ValueError : PyNULL
16
test/JlWrap.jl
@@ -718,7 +718,7 @@ end
718
y = pytextio(x)
719
z = y.fileno()
720
@test pyisinstance(z, pybuiltins.int)
721
- @test pyeq(Bool, z, fd(x))
+ @test z == Base.cconvert(Cint, fd(x))
722
end
723
724
@testset "flush" begin
0 commit comments