Skip to content

Commit

Permalink
add missing error check to iterator; possibly relevant to #168
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Jul 22, 2015
1 parent dd7ffb4 commit 362343d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ function start(po::PyObject)
sigatomic_begin()
try
o = PyObject(@pycheckn ccall((@pysym :PyObject_GetIter), PyPtr, (PyPtr,), po))
nxt = PyObject(ccall((@pysym :PyIter_Next), PyPtr, (PyPtr,), o))
nxt = PyObject(@pycheck ccall((@pysym :PyIter_Next), PyPtr, (PyPtr,), o))

return (nxt,o)
finally
Expand All @@ -870,7 +870,7 @@ end
function next(po::PyObject, s)
sigatomic_begin()
try
nxt = PyObject(ccall((@pysym :PyIter_Next), PyPtr, (PyPtr,), s[2]))
nxt = PyObject(@pycheck ccall((@pysym :PyIter_Next), PyPtr, (PyPtr,), s[2]))
return (convert(PyAny, s[1]), (nxt, s[2]))
finally
sigatomic_end()
Expand Down

0 comments on commit 362343d

Please sign in to comment.