/[pcre]/code/trunk/pcre_exec.c
ViewVC logotype

Diff of /code/trunk/pcre_exec.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 893 by ph10, Thu Jan 19 17:15:11 2012 UTC revision 895 by ph10, Fri Jan 20 12:12:03 2012 UTC
# Line 618  eptrblock newptrb; Line 618  eptrblock newptrb;
618    
619  /* There is a special fudge for calling match() in a way that causes it to  /* There is a special fudge for calling match() in a way that causes it to
620  measure the size of its basic stack frame when the stack is being used for  measure the size of its basic stack frame when the stack is being used for
621  recursion. The first argument (eptr) points to a pointer that is used  recursion. The second argument (ecode) being NULL triggers this behaviour. It
622  "statically" for doing the calculation. The second argument (ecode) being NULL  cannot normally every be NULL. The return is the negated value of the frame
623  triggers this behaviour. It cannot normally every be NULL. The return is the  size. */
 negated value of the frame size. */  
624    
625  if (ecode == NULL)  if (ecode == NULL)
626    {    {
   char **aptr = (char **)eptr;  
627    if (rdepth == 0)    if (rdepth == 0)
628      {      return match((PCRE_PUCHAR)&rdepth, NULL, NULL, 0, NULL, NULL, 1);
     *aptr = (char *)&rdepth;  
     return match(eptr, NULL, NULL, 0, NULL, NULL, 1);  
     }  
629    else    else
630      {      {
631      int len = (char *)&rdepth - *aptr;      int len = (char *)&rdepth - (char *)eptr;
632      return (len > 0)? -len : len;      return (len > 0)? -len : len;
633      }      }
634    }    }
# Line 6219  if (re == NULL && extra_data == NULL && Line 6214  if (re == NULL && extra_data == NULL &&
6214  #ifdef NO_RECURSE  #ifdef NO_RECURSE
6215    return -sizeof(heapframe);    return -sizeof(heapframe);
6216  #else  #else
6217    return match((PCRE_PUCHAR)&start_partial, NULL, NULL, 0, NULL, NULL, 0);    return match(NULL, NULL, NULL, 0, NULL, NULL, 0);
6218  #endif  #endif
6219    
6220  /* Plausibility checks */  /* Plausibility checks */

Legend:
Removed from v.893  
changed lines
  Added in v.895

  ViewVC Help
Powered by ViewVC 1.1.5