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

Diff of /code/trunk/pcre32_jit_compile.c

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

revision 199 by ph10, Tue Jul 31 14:39:09 2007 UTC revision 836 by ph10, Wed Dec 28 17:16:11 2011 UTC
# Line 6  Line 6 
6  and semantics are as close as possible to those of the Perl 5 language.  and semantics are as close as possible to those of the Perl 5 language.
7    
8                         Written by Philip Hazel                         Written by Philip Hazel
9             Copyright (c) 1997-2007 University of Cambridge             Copyright (c) 1997-2012 University of Cambridge
10    
11  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
12  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 44  pattern data block. This might be helpfu Line 44  pattern data block. This might be helpfu
44  shared by different users. */  shared by different users. */
45    
46    
47  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
48  #include <config.h>  #include "config.h"
49  #endif  #endif
50    
51  #include "pcre_internal.h"  #include "pcre_internal.h"
52    
# Line 68  Returns:        the (possibly updated) c Line 68  Returns:        the (possibly updated) c
68                  a negative error number                  a negative error number
69  */  */
70    
71  PCRE_EXP_DEFN int  #ifdef COMPILE_PCRE8
72    PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
73  pcre_refcount(pcre *argument_re, int adjust)  pcre_refcount(pcre *argument_re, int adjust)
74    #else
75    PCRE_EXP_DEFN int PCRE_CALL_CONVENTION
76    pcre_refcount(pcre *argument_re, int adjust)
77    #endif
78  {  {
79  real_pcre *re = (real_pcre *)argument_re;  real_pcre *re = (real_pcre *)argument_re;
80  if (re == NULL) return PCRE_ERROR_NULL;  if (re == NULL) return PCRE_ERROR_NULL;
81    if (re->magic_number != MAGIC_NUMBER) return PCRE_ERROR_BADMAGIC;
82    if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
83  re->ref_count = (-adjust > re->ref_count)? 0 :  re->ref_count = (-adjust > re->ref_count)? 0 :
84                  (adjust + re->ref_count > 65535)? 65535 :                  (adjust + re->ref_count > 65535)? 65535 :
85                  re->ref_count + adjust;                  re->ref_count + adjust;

Legend:
Removed from v.199  
changed lines
  Added in v.836

  ViewVC Help
Powered by ViewVC 1.1.5