[Python-checkins] python/dist/src/Modules _sre.c,2.79,2.80

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Thu, 13 Jun 2002 14:11:16 -0700


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

Modified Files:
	_sre.c 
Log Message:
SF #561244 Micro optimizations

Convert loops to memset()s.


Index: _sre.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_sre.c,v
retrieving revision 2.79
retrieving revision 2.80
diff -C2 -d -r2.79 -r2.80
*** _sre.c	31 Mar 2002 15:46:00 -0000	2.79
--- _sre.c	13 Jun 2002 21:11:11 -0000	2.80
***************
*** 1377,1387 ****
  state_reset(SRE_STATE* state)
  {
-     int i;
- 
      state->lastmark = 0;
  
      /* FIXME: dynamic! */
!     for (i = 0; i < SRE_MARK_SIZE; i++)
!         state->mark[i] = NULL;
  
      state->lastindex = -1;
--- 1377,1384 ----
  state_reset(SRE_STATE* state)
  {
      state->lastmark = 0;
  
      /* FIXME: dynamic! */
!     memset(state->mark, 0, sizeof(*state->mark) * SRE_MARK_SIZE);
  
      state->lastindex = -1;