diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-04-04 14:06:52 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2007-04-04 14:06:52 +0000 |
commit | 765b484a8ea8410faa15130c965d56b81eff29d6 (patch) | |
tree | 5c81c25f181ff13a5e1016cd9d967df2fd14e42b /pcre_globals.c | |
parent | 538ef4f8d6632b422169714282844c34b4bfc271 (diff) | |
download | pcre-765b484a8ea8410faa15130c965d56b81eff29d6.tar.gz |
Reworked all the WIN32 __declspec stuff in the hope of getting it right.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@145 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_globals.c')
-rw-r--r-- | pcre_globals.c | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/pcre_globals.c b/pcre_globals.c index a19dbdc..dbde57e 100644 --- a/pcre_globals.c +++ b/pcre_globals.c @@ -46,37 +46,14 @@ indirection. These values can be changed by the caller, but are shared between all threads. However, when compiling for Virtual Pascal, things are done differently, and global variables are not used (see pcre.in). */ - #include "pcre_internal.h" - #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; -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; +PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc; +PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = free; +PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = malloc; +PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = free; +PCRE_EXP_DATA_DEFN int (*pcre_callout)(pcre_callout_block *) = NULL; #endif /* End of pcre_globals.c */ |