Commit be35b2c
committed
Fix GIL check to verify thread state before Py_BEGIN_ALLOW_THREADS
PyGILState_Check() can return true even with NULL thread state on some
platforms. Add PyGILState_GetThisThreadState() check to ensure valid
thread state before using Py_BEGIN_ALLOW_THREADS macro.1 parent 43ea6b0 commit be35b2c
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
770 | | - | |
771 | | - | |
772 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
773 | 773 | | |
774 | | - | |
775 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
776 | 777 | | |
777 | 778 | | |
778 | 779 | | |
779 | 780 | | |
780 | | - | |
| 781 | + | |
781 | 782 | | |
782 | 783 | | |
783 | 784 | | |
| |||
0 commit comments