Skip to content

Commit

Permalink
[fix] surround (python-may-be-error) in another unwind-protect
Browse files Browse the repository at this point in the history
  • Loading branch information
digikar99 committed Feb 7, 2024
1 parent 27389b2 commit 49d82b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gil-gc.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@

(defmacro with-python-gil (&body body)
`(let* ((*gil* (pygil-ensure)))
(unwind-protect (locally ,@body)
(python-may-be-error)
(unwind-protect
(unwind-protect (locally ,@body)
(python-may-be-error))
(pygil-release *gil*))))

(defmacro without-python-gil (&body body)
Expand Down

0 comments on commit 49d82b1

Please sign in to comment.