Skip to content

Commit 7bdfe5f

Browse files
committed
Revert "Wrap more ccall with disable_sigint"
This reverts commit bd0fcd8.
1 parent bd0fcd8 commit 7bdfe5f

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/PyCall.jl

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,7 @@ function getindex(o::PyObject, s::AbstractString)
283283
if ispynull(o)
284284
throw(ArgumentError("ref of NULL PyObject"))
285285
end
286-
p = disable_sigint() do
287-
ccall((@pysym :PyObject_GetAttrString), PyPtr, (PyPtr, Cstring), o, s)
288-
end
286+
p = ccall((@pysym :PyObject_GetAttrString), PyPtr, (PyPtr, Cstring), o, s)
289287
if p == C_NULL
290288
pyerr_clear()
291289
throw(KeyError(s))
@@ -299,11 +297,8 @@ function setindex!(o::PyObject, v, s::Union{Symbol,AbstractString})
299297
if ispynull(o)
300298
throw(ArgumentError("assign of NULL PyObject"))
301299
end
302-
e = disable_sigint() do
303-
ccall((@pysym :PyObject_SetAttrString), Cint,
304-
(PyPtr, Cstring, PyPtr), o, s, PyObject(v))
305-
end
306-
if -1 == e
300+
if -1 == ccall((@pysym :PyObject_SetAttrString), Cint,
301+
(PyPtr, Cstring, PyPtr), o, s, PyObject(v))
307302
pyerr_clear()
308303
throw(KeyError(s))
309304
end
@@ -314,11 +309,8 @@ function haskey(o::PyObject, s::Union{Symbol,AbstractString})
314309
if ispynull(o)
315310
throw(ArgumentError("haskey of NULL PyObject"))
316311
end
317-
318-
return 1 == disable_sigint() do
319-
ccall((@pysym :PyObject_HasAttrString), Cint,
320-
(PyPtr, Cstring), o, s)
321-
end
312+
return 1 == ccall((@pysym :PyObject_HasAttrString), Cint,
313+
(PyPtr, Cstring), o, s)
322314
end
323315

324316
#########################################################################

0 commit comments

Comments
 (0)