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,13 @@ 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 *);
21 +#define pcre_malloc g_try_malloc
22 +#define pcre_free g_free
23 +#define pcre_stack_malloc g_try_malloc
25 PCRE_DATA_SCOPE int (*pcre_callout)(pcre_callout_block *);
27 -PCRE_DATA_SCOPE void *pcre_malloc(size_t);
28 -PCRE_DATA_SCOPE void pcre_free(void *);
29 -PCRE_DATA_SCOPE void *pcre_stack_malloc(size_t);
30 -PCRE_DATA_SCOPE void pcre_stack_free(void *);
31 -PCRE_DATA_SCOPE int pcre_callout(pcre_callout_block *);
32 -#endif /* VPCOMPAT */
34 /* Exported PCRE functions */
36 diff -r 0f4042339eb5 pcre/pcre_globals.c
37 --- pcre/pcre_globals.c Tue Jul 25 22:39:16 2006 +0200
38 +++ pcre/pcre_globals.c Tue Jul 25 22:52:10 2006 +0200
39 @@ -50,32 +50,9 @@ differently, and global variables are no
40 #include "pcre_internal.h"
45 -/**************************************************************************
46 -This code used to be here for use when compiling as a C++ library. However,
47 -according to Dair Grant it is not needed: "
49 - Including 'extern "C"' in the declaration generates an "initialized and
50 - declared `extern'" warning from gcc 4.0.1. Since we include pcre_internal.h,
51 - which includes pcre.h, which declares these prototypes within an extern "C" {}
52 - block, we shouldn't need the prefix here.
54 -So, from Release 7.0 I have cut this out.
57 -extern "C" void *(*pcre_malloc)(size_t) = malloc;
58 -extern "C" void (*pcre_free)(void *) = free;
59 -extern "C" void *(*pcre_stack_malloc)(size_t) = malloc;
60 -extern "C" void (*pcre_stack_free)(void *) = free;
61 extern "C" int (*pcre_callout)(pcre_callout_block *) = NULL;
63 -**************************************************************************/
65 -void *(*pcre_malloc)(size_t) = malloc;
66 -void (*pcre_free)(void *) = free;
67 -void *(*pcre_stack_malloc)(size_t) = malloc;
68 -void (*pcre_stack_free)(void *) = free;
69 int (*pcre_callout)(pcre_callout_block *) = NULL;
72 diff -r 0f4042339eb5 pcre/pcre_internal.h
73 --- pcre/pcre_internal.h Tue Jul 25 22:39:16 2006 +0200
74 +++ pcre/pcre_internal.h Tue Jul 25 22:52:10 2006 +0200
75 @@ -480,10 +480,7 @@ variable-length repeat, or a anything ot
77 /* Miscellaneous definitions */
83 +typedef gboolean BOOL;
85 /* Escape items that are just an encoding of a particular data value. */