In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/2ec31dd9f923af3a899842b086bdc04c45569b29?hp=be064c4a1f59651142e99788731ae1d164c19537>

- Log -----------------------------------------------------------------
commit 2ec31dd9f923af3a899842b086bdc04c45569b29
Author: Karl Williamson <pub...@khwilliamson.com>
Date:   Sun Oct 3 10:19:23 2010 -0600

    Small efficiency nit for regcurly()
    
    As previously written, a test was executed unnecessarily

M       dquote_static.c

commit b3155d952c8db59f6affd1762888f9c98cdc587c
Author: Karl Williamson <pub...@khwilliamson.com>
Date:   Sun Oct 3 10:18:27 2010 -0600

    toke.c: call regcurly instead of duplicating code
    
    Remove code that duplicates regcurly()

M       toke.c
-----------------------------------------------------------------------

Summary of changes:
 dquote_static.c |    7 ++++---
 toke.c          |   13 ++-----------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/dquote_static.c b/dquote_static.c
index c6d22e2..fbd8c38 100644
--- a/dquote_static.c
+++ b/dquote_static.c
@@ -32,10 +32,11 @@ regcurly(register const char *s)
        return FALSE;
     while (isDIGIT(*s))
        s++;
-    if (*s == ',')
-       s++;
-    while (isDIGIT(*s))
+    if (*s == ',') {
        s++;
+       while (isDIGIT(*s))
+           s++;
+    }
     if (*s != '}')
        return FALSE;
     return TRUE;
diff --git a/toke.c b/toke.c
index dd49c3c..d81b968 100644
--- a/toke.c
+++ b/toke.c
@@ -3513,19 +3513,10 @@ S_intuit_more(pTHX_ register char *s)
 
     /* In a pattern, so maybe we have {n,m}. */
     if (*s == '{') {
-       s++;
-       if (!isDIGIT(*s))
-           return TRUE;
-       while (isDIGIT(*s))
-           s++;
-       if (*s == ',')
-           s++;
-       while (isDIGIT(*s))
-           s++;
-       if (*s == '}')
+       if (regcurly(s)) {
            return FALSE;
+       }
        return TRUE;
-       
     }
 
     /* On the other hand, maybe we have a character class */

--
Perl5 Master Repository

Reply via email to