/[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 199 by ph10, Tue Jul 31 14:39:09 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    #ifdef HAVE_CONFIG_H
50    #include <config.h>
51    #endif
52    
53  #include "pcre_internal.h"  #include "pcre_internal.h"
54    
   
55  #ifndef VPCOMPAT  #ifndef VPCOMPAT
56    PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc;
57  /**************************************************************************  PCRE_EXP_DATA_DEFN void  (*pcre_free)(void *) = free;
58  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;
59  according to Dair Grant it is not needed: "  PCRE_EXP_DATA_DEFN void  (*pcre_stack_free)(void *) = free;
60    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;  
61  #endif  #endif
62    
63  /* End of pcre_globals.c */  /* End of pcre_globals.c */

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12