[Python-checkins] CVS: python/dist/src/Modules zlibmodule.c,2.50,2.51

Tim Peters tim_one@users.sourceforge.net
Tue, 16 Oct 2001 20:43:56 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv14366/python/Modules

Modified Files:
	zlibmodule.c 
Log Message:
Removed obsolete comments about confused string refcount tricks (Jeremy
removed the tricks).

Changed the ENTER/LEAVE_ZLIB macros so as not to create a new block (a
new block is neither necessary nor helpful).


Index: zlibmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/zlibmodule.c,v
retrieving revision 2.50
retrieving revision 2.51
diff -C2 -d -r2.50 -r2.51
*** zlibmodule.c	2001/10/16 23:26:08	2.50
--- zlibmodule.c	2001/10/17 03:43:54	2.51
***************
*** 24,32 ****
     other Python threads.
  
-    We don't need to worry about the string inputs being modified out
-    from underneath us, because string objects are immutable.  However,
-    we do need to make sure we take on ownership, so that the strings
-    are not deleted out from under us during a thread swap.
- 
     N.B.
  
--- 24,27 ----
***************
*** 37,41 ****
     moment the ENTER_ZLIB and LEAVE_ZLIB calls are global for ALL
     de/compress objects.
- 
   */
  
--- 32,35 ----
***************
*** 43,51 ****
  
  #define ENTER_ZLIB \
!        { Py_BEGIN_ALLOW_THREADS PyThread_acquire_lock(zlib_lock, 1); \
!          Py_END_ALLOW_THREADS
  
  #define LEAVE_ZLIB \
!        PyThread_release_lock(zlib_lock); }
  
  #else
--- 37,46 ----
  
  #define ENTER_ZLIB \
! 	Py_BEGIN_ALLOW_THREADS \
! 	PyThread_acquire_lock(zlib_lock, 1); \
! 	Py_END_ALLOW_THREADS
  
  #define LEAVE_ZLIB \
! 	PyThread_release_lock(zlib_lock);
  
  #else