Add some more cases to the app-id unit tests
[glib.git] / glib / update-pcre / memory.patch
blobf3a04c784957b9bba2fc614de6689f020435c06e
1 From acf401f1353a37b6edff9577ff07d055c625e4ca Mon Sep 17 00:00:00 2001
2 From: Christian Persch <chpe@gnome.org>
3 Date: Sun, 12 Feb 2012 19:40:48 +0100
4 Subject: [PATCH] regex: Use glib memory allocator
6 ---
7 glib/pcre/pcre_globals.c | 10 ++++++----
8 1 files changed, 6 insertions(+), 4 deletions(-)
10 diff --git a/glib/pcre/pcre_globals.c b/glib/pcre/pcre_globals.c
11 index 36e6ddb..93d3af5 100644
12 --- a/glib/pcre/pcre_globals.c
13 +++ b/glib/pcre/pcre_globals.c
14 @@ -58,6 +58,8 @@ global variables are not used. */
16 #include "pcre_internal.h"
18 +#include "gmem.h"
20 #if defined _MSC_VER || defined __SYMBIAN32__
21 static void* LocalPcreMalloc(size_t aSize)
23 @@ -74,10 +76,10 @@ PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = LocalPcreFree;
24 PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL;
26 #elif !defined VPCOMPAT
27 -PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = malloc;
28 -PCRE_EXP_DATA_DEFN void (*PUBL(free))(void *) = free;
29 -PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = malloc;
30 -PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = free;
31 +PCRE_EXP_DATA_DEFN void *(*PUBL(malloc))(size_t) = g_try_malloc;
32 +PCRE_EXP_DATA_DEFN void (*PUBL(free))(void *) = g_free;
33 +PCRE_EXP_DATA_DEFN void *(*PUBL(stack_malloc))(size_t) = g_try_malloc;
34 +PCRE_EXP_DATA_DEFN void (*PUBL(stack_free))(void *) = g_free;
35 PCRE_EXP_DATA_DEFN int (*PUBL(callout))(PUBL(callout_block) *) = NULL;
36 #endif
38 --
39 1.7.5.1.217.g4e3aa.dirty