Skip to content

Commit

Permalink
Fix #33
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed Aug 1, 2013
1 parent 119e34e commit d200baa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ end
function jl_IO_writelines(self_::PyPtr, arg_::PyPtr)
try
io = unsafe_pyjlwrap_to_objref(self_)::IO
for s in PyVector{String}(PyObject(arg_))
for s in PyVector{String}(pyincref(PyObject(arg_)))
write(io, s)
end
ccall((@pysym :Py_IncRef), Void, (PyPtr,), pynothing::PyPtr)
Expand Down Expand Up @@ -263,7 +263,7 @@ end
function jl_IO_readinto(self_::PyPtr, arg_::PyPtr)
try
io = unsafe_pyjlwrap_to_objref(self_)::IO
b = convert(Vector{Uint8}, PyObject(arg_))
b = convert(Vector{Uint8}, pyincref(PyObject(arg_)))
return pyincref(PyObject(readbytes!(io, b))).o
catch e
ioraise(e)
Expand All @@ -274,7 +274,7 @@ end
function jl_IO_write(self_::PyPtr, arg_::PyPtr)
try
io = unsafe_pyjlwrap_to_objref(self_)::IO
b = convert(Vector{Uint8}, PyObject(arg_))
b = convert(Vector{Uint8}, pyincref(PyObject(arg_)))
return pyincref(PyObject(write(io, b))).o
catch e
ioraise(e)
Expand Down

0 comments on commit d200baa

Please sign in to comment.