Ignore:
Timestamp:
Nov 29, 2007, 3:04:06 AM (18 years ago)
Author:
[email protected]
Message:

2007-11-24 Eric Seidel <[email protected]>

Reviewed by Maciej.

Clean up jsRegExpExecute

  • pcre/pcre_compile.cpp: (returnError): (jsRegExpCompile):
  • pcre/pcre_exec.cpp: (jsRegExpExecute):
  • pcre/pcre_internal.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/pcre/pcre_compile.cpp

    r28058 r28138  
    29352935
    29362936#ifdef DEBUG
    2937 static void printCompiledRegExp(real_pcre* re, int length)
     2937static void printCompiledRegExp(JSRegExp* re, int length)
    29382938{
    29392939    printf("Length = %d top_bracket = %d top_backref = %d\n",
     
    29922992*/
    29932993
    2994 static pcre* returnError(ErrorCode errorcode, const char** errorptr)
     2994static JSRegExp* returnError(ErrorCode errorcode, const char** errorptr)
    29952995{
    29962996    *errorptr = error_text(errorcode);
     
    29982998}
    29992999
    3000 pcre* jsRegExpCompile(const pcre_char* pattern, int patternLength,
     3000JSRegExp* jsRegExpCompile(const pcre_char* pattern, int patternLength,
    30013001                JSRegExpIgnoreCaseOption ignoreCase, JSRegExpMultilineOption multiline,
    30023002                unsigned* numSubpatterns, const char** errorptr)
     
    30183018        return returnError(ERR16, errorptr);
    30193019   
    3020     size_t size = length + sizeof(real_pcre);
    3021     real_pcre* re = reinterpret_cast<real_pcre*>(new char[size]);
     3020    size_t size = length + sizeof(JSRegExp);
     3021    JSRegExp* re = reinterpret_cast<JSRegExp*>(new char[size]);
    30223022   
    30233023    if (!re)
     
    31393139    if (numSubpatterns)
    31403140        *numSubpatterns = re->top_bracket;
    3141     return (pcre *)re;
     3141    return static_cast<JSRegExp*>(re);
    31423142}
    31433143
Note: See TracChangeset for help on using the changeset viewer.