/[pcre]/code/branches/pcre16/pcre_exec.c
ViewVC logotype

Diff of /code/branches/pcre16/pcre_exec.c

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

revision 808 by zherczeg, Thu Dec 15 11:57:39 2011 UTC revision 809 by zherczeg, Mon Dec 19 11:04:45 2011 UTC
# Line 6041  PCRE_PUCHAR end_subject; Line 6041  PCRE_PUCHAR end_subject;
6041  PCRE_PUCHAR start_partial = NULL;  PCRE_PUCHAR start_partial = NULL;
6042  PCRE_PUCHAR req_char_ptr = start_match - 1;  PCRE_PUCHAR req_char_ptr = start_match - 1;
6043    
 pcre_study_data internal_study;  
6044  const pcre_study_data *study;  const pcre_study_data *study;
   
 real_pcre internal_re;  
6045  const real_pcre *external_re = (const real_pcre *)argument_re;  const real_pcre *external_re = (const real_pcre *)argument_re;
6046  const real_pcre *re = external_re;  const real_pcre *re = external_re;
6047    
# Line 6151  in other programs later. */ Line 6148  in other programs later. */
6148  if (tables == NULL) tables = PRIV(default_tables);  if (tables == NULL) tables = PRIV(default_tables);
6149    
6150  /* Check that the first field in the block is the magic number. If it is not,  /* Check that the first field in the block is the magic number. If it is not,
6151  test for a regex that was compiled on a host of opposite endianness. If this is  return with PCRE_ERROR_BADMAGIC. However, if the magic number is equal to
6152  the case, flipped values are put in internal_re and internal_study if there was  REVERSED_MAGIC_NUMBER we return with PCRE_ERROR_BADENDIANNESS, which
6153  study data too. */  means that the pattern is likely compiled with different endianness. */
6154    
6155  if (re->magic_number != MAGIC_NUMBER)  if (re->magic_number != MAGIC_NUMBER)
6156    {    return re->magic_number == REVERSED_MAGIC_NUMBER?
6157    re = PRIV(try_flipped)(re, &internal_re, study, &internal_study);      PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
   if (re == NULL) return PCRE_ERROR_BADMAGIC;  
   if (study != NULL) study = &internal_study;  
   }  
6158  if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;  if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
6159    
6160  /* Set up other data */  /* Set up other data */

Legend:
Removed from v.808  
changed lines
  Added in v.809

  ViewVC Help
Powered by ViewVC 1.1.5