diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-06-13 21:11:11 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-06-13 21:11:11 (GMT) |
commit | 35fc7606f076f507bd25acaf464e83c75c3756f4 (patch) | |
tree | 30ac7b6223407e2660a1c7d542f01a1560b407d0 /Modules | |
parent | 606edc1d971a0c5e4f5d379ecfa69f42b5b1d691 (diff) | |
download | cpython-35fc7606f076f507bd25acaf464e83c75c3756f4.zip cpython-35fc7606f076f507bd25acaf464e83c75c3756f4.tar.gz cpython-35fc7606f076f507bd25acaf464e83c75c3756f4.tar.bz2 |
SF #561244 Micro optimizations
Convert loops to memset()s.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_sre.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index b98f6e6..839763d 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -1376,13 +1376,10 @@ sre_getlower(PyObject* self, PyObject* args) LOCAL(void) state_reset(SRE_STATE* state) { - int i; - state->lastmark = 0; /* FIXME: dynamic! */ - for (i = 0; i < SRE_MARK_SIZE; i++) - state->mark[i] = NULL; + memset(state->mark, 0, sizeof(*state->mark) * SRE_MARK_SIZE); state->lastindex = -1; |