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

Diff of /code/trunk/pcre_study.c

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

revision 659 by ph10, Tue Aug 16 09:48:29 2011 UTC revision 673 by ph10, Thu Aug 25 16:06:03 2011 UTC
# Line 1293  switch(min = find_minlength(code, code, Line 1293  switch(min = find_minlength(code, code,
1293    default: break;    default: break;
1294    }    }
1295    
1296  /* Return NULL if there's been an error or if no optimization is possible. */  /* Return NULL if there's been an (internal) error or if no optimization is
1297    possible. A FALSE setting for bits_set is common when there are no obvious
1298    starting bytes. However a negative value of min occurs only when the pattern
1299    contains \C, in other words, it's an exceptional case nowadays. */
1300    
1301  if (*errorptr != NULL || (!bits_set && min < 0)) return NULL;  if (*errorptr != NULL || (!bits_set && min < 0)) return NULL;
1302    
# Line 1332  if (min >= 0) Line 1335  if (min >= 0)
1335    study->minlength = min;    study->minlength = min;
1336    }    }
1337    
1338    /* If JIT support was compiled and requested, attempt the JIT compilation. */
1339    
1340    extra->executable_jit = NULL;
1341    #ifdef SUPPORT_JIT
1342    if ((options & PCRE_STUDY_JIT_COMPILE) != 0) _pcre_jit_compile(re, extra);
1343    #endif
1344    
1345  return extra;  return extra;
1346  }  }
1347    
1348    
1349    /*************************************************
1350    *          Free the study data                   *
1351    *************************************************/
1352    
1353    /* This function frees the memory that was obtained by pcre_study().
1354    
1355    Argument:   a pointer to the pcre_extra block
1356    Returns:    nothing
1357    */
1358    
1359    PCRE_EXP_DEFN void
1360    pcre_free_study(pcre_extra *extra)
1361    {
1362    #ifdef SUPPORT_JIT
1363    if ((extra->flags & PCRE_EXTRA_EXECUTABLE_JIT) != 0 &&
1364         extra->executable_jit != NULL)
1365      _pcre_jit_free(extra->executable_jit);
1366    #endif
1367    pcre_free(extra);
1368    }
1369    
1370  /* End of pcre_study.c */  /* End of pcre_study.c */

Legend:
Removed from v.659  
changed lines
  Added in v.673

  ViewVC Help
Powered by ViewVC 1.1.5