summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-02-17 10:09:49 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-02-17 10:09:49 +0000
commit657defae1d0a26651e10e5c76cf56e0b4f99e0da (patch)
tree4a1255c5162020a51301bc11e4c7329f13557d13
parent039db4047d97c4c41c6752dce8deca9363824ba8 (diff)
downloadirssi-657defae1d0a26651e10e5c76cf56e0b4f99e0da.zip
added g_module_build_path()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1222 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/core/memdebug.c11
-rw-r--r--src/core/memdebug.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/core/memdebug.c b/src/core/memdebug.c
index da75f0b8..213d4542 100644
--- a/src/core/memdebug.c
+++ b/src/core/memdebug.c
@@ -21,7 +21,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+
#include <glib.h>
+#include <gmodule.h>
/*#define ENABLE_BUFFER_CHECKS*/
#define BUFFER_CHECK_SIZE 5
@@ -311,6 +313,15 @@ char *ig_dirname(const char *file, int line, const char *fname)
return ret;
}
+char *ig_module_build_path(const char *file, int line, const char *dir, const char *module)
+{
+ char *ret;
+
+ ret = g_module_build_path(dir, module);
+ data_add(ret, INT_MIN, file, line);
+ return ret;
+}
+
void ig_profile_line(void *key, MEM_REC *rec)
{
char *data;
diff --git a/src/core/memdebug.h b/src/core/memdebug.h
index 49bd3f84..0df8cdf5 100644
--- a/src/core/memdebug.h
+++ b/src/core/memdebug.h
@@ -27,6 +27,7 @@ char *ig_dirname(const char *file, int line, const char *fname);
#define g_string_free(a, b) ig_string_free(__FILE__, __LINE__, a, b)
#define g_strjoinv(a,b) ig_strjoinv(__FILE__, __LINE__, a, b)
#define g_dirname(a) ig_dirname(__FILE__, __LINE__, a)
+#define g_module_build_path(a, b) ig_module_build_path(__FILE__, __LINE__, a, b)
#ifndef __STRICT_ANSI__
#define g_strconcat(a...) ig_strconcat(__FILE__, __LINE__, ##a)