From fe8f85186e9a2b9ffa7ebb157ab91a39df39941f Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Wed, 18 Jul 2007 20:11:16 +0100 Subject: [PATCH 1/1] a couple of missing pcre -> gc bindings Organization: Straylight/Edgeware From: Richard Kettlewell --- clients/disorder.c | 4 ++++ disobedience/disobedience.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/clients/disorder.c b/clients/disorder.c index d2e3512..0ce20aa 100644 --- a/clients/disorder.c +++ b/clients/disorder.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "configuration.h" #include "syscalls.h" @@ -502,6 +503,9 @@ int main(int argc, char **argv) { struct vector args; mem_init(); + /* garbage-collect PCRE's memory */ + pcre_malloc = xmalloc; + pcre_free = xfree; if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale"); while((n = getopt_long(argc, argv, "hVc:dHL", options, 0)) >= 0) { switch(n) { diff --git a/disobedience/disobedience.c b/disobedience/disobedience.c index e0a987a..c37d0bc 100644 --- a/disobedience/disobedience.c +++ b/disobedience/disobedience.c @@ -22,6 +22,7 @@ #include #include +#include /* Apologies for the numerous de-consting casts, but GLib et al do not seem to * have heard of const. */ @@ -320,6 +321,9 @@ int main(int argc, char **argv) { disorder_eclient *logclient; mem_init(); + /* garbage-collect PCRE's memory */ + pcre_malloc = xmalloc; + pcre_free = xfree; if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale"); gtk_init(&argc, &argv); gtk_rc_parse_string(style); -- [mdw]