aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-06-19 04:07:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-06-19 04:07:09 +0800
commit7f972efe0d2889052fbb49dceb28af5c9e1308a6 (patch)
tree6522abf8bd205f0bb3e30506eb9fcab3b78f52f8 /camel/camel-mime-utils.c
parentd1d0e8e307fc3fd65d15a407637129d529bb0668 (diff)
downloadgsoc2013-evolution-7f972efe0d2889052fbb49dceb28af5c9e1308a6.tar
gsoc2013-evolution-7f972efe0d2889052fbb49dceb28af5c9e1308a6.tar.gz
gsoc2013-evolution-7f972efe0d2889052fbb49dceb28af5c9e1308a6.tar.bz2
gsoc2013-evolution-7f972efe0d2889052fbb49dceb28af5c9e1308a6.tar.lz
gsoc2013-evolution-7f972efe0d2889052fbb49dceb28af5c9e1308a6.tar.xz
gsoc2013-evolution-7f972efe0d2889052fbb49dceb28af5c9e1308a6.tar.zst
gsoc2013-evolution-7f972efe0d2889052fbb49dceb28af5c9e1308a6.zip
Call camel_mime_utils_shutdown() and camel_operation_shutdown().
2004-06-18 Jeffrey Stedfast <fejj@novell.com> * camel.c (camel_shutdown): Call camel_mime_utils_shutdown() and camel_operation_shutdown(). * camel-operation.c (camel_operation_shutdown): New function. * camel-mime-utils.c (camel_mime_utils_shutdown): New function to clean up the compiled regexes. svn path=/trunk/; revision=26425
Diffstat (limited to 'camel/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 4e5ec39ee3..6e7607f096 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -4246,7 +4246,7 @@ camel_mime_utils_init(void)
base64_init();
/* precompile regex's for speed at runtime */
- for (i = 0; i < sizeof(mail_list_magic) / sizeof(mail_list_magic[0]); i++) {
+ for (i = 0; i < G_N_ELEMENTS (mail_list_magic); i++) {
errcode = regcomp(&mail_list_magic[i].regex, mail_list_magic[i].pattern, REG_EXTENDED|REG_ICASE);
if (errcode != 0) {
char *errstr;
@@ -4264,3 +4264,13 @@ camel_mime_utils_init(void)
g_assert(regex_compilation_failed == 0);
}
+
+
+void
+camel_mime_utils_shutdown (void)
+{
+ int i;
+
+ for (i = 0; i < G_N_ELEMENTS (mail_list_magic); i++)
+ regfree (&mail_list_magic[i].regex);
+}