/[pcre]/code/tags/pcre-8.02/pcre_globals.c
ViewVC logotype

Diff of /code/tags/pcre-8.02/pcre_globals.c

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

revision 93 by nigel, Sat Feb 24 21:41:42 2007 UTC revision 200 by ph10, Wed Aug 1 09:10:40 2007 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-2006 University of Cambridge             Copyright (c) 1997-2007 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 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.93  
changed lines
  Added in v.200

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12