1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Added g_dirname() so ig_free() won't complain when free()ing it.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@366 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-06-18 10:02:39 +00:00 committed by cras
parent a5d31a195d
commit d110c9cb3b
2 changed files with 11 additions and 0 deletions

View File

@ -286,6 +286,15 @@ char *ig_strjoinv(const char *file, int line, const char *sepa, char **array)
return ret;
}
char *ig_dirname(const char *file, int line, const char *fname)
{
char *ret;
ret = g_dirname(fname);
data_add(ret, INT_MIN, file, line);
return ret;
}
void ig_profile_line(void *key, MEM_REC *rec)
{
char *data;

View File

@ -15,6 +15,7 @@ void ig_free(void *p);
GString *ig_string_new(const char *file, int line, const char *str);
void ig_string_free(const char *file, int line, GString *str, int freeit);
char *ig_strjoinv(const char *file, int line, const char *sepa, char **array);
char *ig_dirname(const char *file, int line, const char *fname);
#define g_malloc(a) ig_malloc(a, __FILE__, __LINE__)
#define g_malloc0(a) ig_malloc0(a, __FILE__, __LINE__)
@ -28,4 +29,5 @@ char *ig_strjoinv(const char *file, int line, const char *sepa, char **array);
#define g_string_new(a) ig_string_new(__FILE__, __LINE__, a)
#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)
#endif