summaryrefslogtreecommitdiff
path: root/pcre_globals.c
diff options
context:
space:
mode:
authornigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:41:42 +0000
committernigel <nigel@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-02-24 21:41:42 +0000
commit876a1a775acdc16384b603754a67010ca8e80cda (patch)
treee9b25e0bf3c35e0455cdffef8f42cb72ca3c31f3 /pcre_globals.c
parent78d9c9e331dc39ca5131981dd347b7b3aeca459f (diff)
downloadpcre-876a1a775acdc16384b603754a67010ca8e80cda.tar.gz
Load pcre-7.0 into code/trunk.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@93 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_globals.c')
-rw-r--r--pcre_globals.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/pcre_globals.c b/pcre_globals.c
index f829acf..f29983e 100644
--- a/pcre_globals.c
+++ b/pcre_globals.c
@@ -51,6 +51,18 @@ differently, and global variables are not used (see pcre.in). */
#ifndef VPCOMPAT
+
+/**************************************************************************
+This code used to be here for use when compiling as a C++ library. However,
+according to Dair Grant it is not needed: "
+
+ 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;
@@ -58,12 +70,13 @@ 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;
#endif
-#endif
/* End of pcre_globals.c */