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

Diff of /code/trunk/pcre_globals.c

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

revision 117 by ph10, Fri Mar 9 15:59:06 2007 UTC revision 145 by ph10, Wed Apr 4 14:06:52 2007 UTC
# Line 46  indirection. These values can be changed Line 46  indirection. These values can be changed
46  all threads. However, when compiling for Virtual Pascal, things are done  all threads. However, when compiling for Virtual Pascal, things are done
47  differently, and global variables are not used (see pcre.in). */  differently, and global variables are not used (see pcre.in). */
48    
   
49  #include "pcre_internal.h"  #include "pcre_internal.h"
50    
   
51  #ifndef VPCOMPAT  #ifndef VPCOMPAT
52    PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc;
53  /**************************************************************************  PCRE_EXP_DATA_DEFN void  (*pcre_free)(void *) = free;
54  This code used to be here for use when compiling as a C++ library. However,  PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = malloc;
55  according to Dair Grant it is not needed: "  PCRE_EXP_DATA_DEFN void  (*pcre_stack_free)(void *) = free;
56    PCRE_EXP_DATA_DEFN int   (*pcre_callout)(pcre_callout_block *) = NULL;
  Including 'extern "C"' in the declaration generates an "initialized and  
  declared `extern'" warning from gcc 4.0.1. Since we include pcre_internal.h,  
  which includes pcre.h, which declares these prototypes within an extern "C" {}  
  block, we shouldn't need the prefix here.  
   
 So, from Release 7.0 I have cut this out.  
   
 #ifdef __cplusplus  
 extern "C" void *(*pcre_malloc)(size_t) = malloc;  
 extern "C" void  (*pcre_free)(void *) = free;  
 extern "C" void *(*pcre_stack_malloc)(size_t) = malloc;  
 extern "C" void  (*pcre_stack_free)(void *) = free;  
 extern "C" int   (*pcre_callout)(pcre_callout_block *) = NULL;  
 #else  
 **************************************************************************/  
   
 void *(*pcre_malloc)(size_t) = malloc;  
 void  (*pcre_free)(void *) = free;  
 void *(*pcre_stack_malloc)(size_t) = malloc;  
 void  (*pcre_stack_free)(void *) = free;  
 int   (*pcre_callout)(pcre_callout_block *) = NULL;  
57  #endif  #endif
58    
59  /* End of pcre_globals.c */  /* End of pcre_globals.c */

Legend:
Removed from v.117  
changed lines
  Added in v.145

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12