1 diff -r 0f4042339eb5 pcre/pcre.h
2 --- pcre/pcre.h Tue Jul 25 22:39:16 2006 +0200
3 +++ pcre/pcre.h Tue Jul 25 22:52:10 2006 +0200
4 @@ -233,25 +233,14 @@ typedef struct pcre_callout_block {
5 /* ------------------------------------------------------------------ */
8 -/* Indirection for store get and free functions. These can be set to
9 -alternative malloc/free functions if required. Special ones are used in the
10 -non-recursive case for "frames". There is also an optional callout function
11 -that is triggered by the (?) regex item. For Virtual Pascal, these definitions
12 -have to take another form. */
15 -PCRE_DATA_SCOPE void *(*pcre_malloc)(size_t);
16 -PCRE_DATA_SCOPE void (*pcre_free)(void *);
17 -PCRE_DATA_SCOPE void *(*pcre_stack_malloc)(size_t);
18 -PCRE_DATA_SCOPE void (*pcre_stack_free)(void *);
22 +#define pcre_malloc g_try_malloc
23 +#define pcre_free g_free
24 +#define pcre_stack_malloc g_try_malloc
26 PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *);
28 -PCRE_DATA_SCOPE void *pcre_malloc(size_t);
29 -PCRE_DATA_SCOPE void pcre_free(void *);
30 -PCRE_DATA_SCOPE void *pcre_stack_malloc(size_t);
31 -PCRE_DATA_SCOPE void pcre_stack_free(void *);
32 -PCRE_DATA_SCOPE int pcre_callout(pcre_callout_block *);
33 -#endif /* VPCOMPAT */
35 /* Exported PCRE functions */
37 diff -r 0f4042339eb5 pcre/pcre_globals.c
38 --- pcre/pcre_globals.c Tue Jul 25 22:39:16 2006 +0200
39 +++ pcre/pcre_globals.c Tue Jul 25 22:52:10 2006 +0200
40 @@ -50,32 +50,9 @@ differently, and global variables are no
41 #include "pcre_internal.h"
46 -/**************************************************************************
47 -This code used to be here for use when compiling as a C++ library. However,
48 -according to Dair Grant it is not needed: "
50 - Including 'extern "C"' in the declaration generates an "initialized and
51 - declared `extern'" warning from gcc 4.0.1. Since we include pcre_internal.h,
52 - which includes pcre.h, which declares these prototypes within an extern "C" {}
53 - block, we shouldn't need the prefix here.
55 -So, from Release 7.0 I have cut this out.
58 -extern "C" void *(*pcre_malloc)(size_t) = malloc;
59 -extern "C" void (*pcre_free)(void *) = free;
60 -extern "C" void *(*pcre_stack_malloc)(size_t) = malloc;
61 -extern "C" void (*pcre_stack_free)(void *) = free;
62 extern "C" int (*pcre_callout)(pcre_callout_block *) = NULL;
64 -**************************************************************************/
66 -void *(*pcre_malloc)(size_t) = malloc;
67 -void (*pcre_free)(void *) = free;
68 -void *(*pcre_stack_malloc)(size_t) = malloc;
69 -void (*pcre_stack_free)(void *) = free;
70 int (*pcre_callout)(pcre_callout_block *) = NULL;
73 diff -r 0f4042339eb5 pcre/pcre_internal.h
74 --- pcre/pcre_internal.h Tue Jul 25 22:39:16 2006 +0200
75 +++ pcre/pcre_internal.h Tue Jul 25 22:52:10 2006 +0200
76 @@ -480,10 +480,7 @@ variable-length repeat, or a anything ot
78 /* Miscellaneous definitions */
84 +typedef gboolean BOOL;
86 /* Escape items that are just an encoding of a particular data value. */