Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1:/tmp/cvs-serv28592
Modified Files:
PyWinTypes.h
Log Message:
Explicit them implicit release would deadlock (and killed win32gui in some
cases)
Index: PyWinTypes.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** PyWinTypes.h 19 Apr 2003 15:54:36 -0000 1.15
--- PyWinTypes.h 1 Sep 2003 08:13:12 -0000 1.16
***************
*** 524,527 ****
--- 524,528 ----
CEnterLeavePython() {
acquire();
+ released = FALSE;
}
void acquire(void) {
***************
*** 532,539 ****
}
void release(void) {
! PyGILState_Release(state);
}
private:
PyGILState_STATE state;
};
#endif // PYWIN_USE_GILSTATE
--- 533,544 ----
}
void release(void) {
! if (!released) {
! PyGILState_Release(state);
! released = TRUE;
! }
}
private:
PyGILState_STATE state;
+ BOOL released;
};
#endif // PYWIN_USE_GILSTATE
|