Mercurial > geeqie
comparison src/filedata.h @ 874:fa39a4d786ad
Increase debugging info in file_data_ref() and file_data_unref().
When compiled with DEBUG defined, file and line of the caller is displayed
in debug log.
author | zas_ |
---|---|
date | Thu, 03 Jul 2008 08:33:10 +0000 |
parents | db68d673448f |
children | d8e1e820cee7 |
comparison
equal
deleted
inserted
replaced
873:bd3bdceb1230 | 874:fa39a4d786ad |
---|---|
12 | 12 |
13 | 13 |
14 #ifndef FILEDATA_H | 14 #ifndef FILEDATA_H |
15 #define FILEDATA_H | 15 #define FILEDATA_H |
16 | 16 |
17 #ifdef DEBUG | |
18 #define DEBUG_FILEDATA | |
19 #endif | |
20 | |
17 gchar *text_from_size(gint64 size); | 21 gchar *text_from_size(gint64 size); |
18 gchar *text_from_size_abrev(gint64 size); | 22 gchar *text_from_size_abrev(gint64 size); |
19 const gchar *text_from_time(time_t t); | 23 const gchar *text_from_time(time_t t); |
20 | 24 |
21 /* this expects a utf-8 path */ | 25 /* this expects a utf-8 path */ |
22 FileData *file_data_new_simple(const gchar *path_utf8); | 26 FileData *file_data_new_simple(const gchar *path_utf8); |
23 | 27 |
28 #ifdef DEBUG_FILEDATA | |
29 FileData *file_data_ref_debug(const gchar *file, gint line, FileData *fd); | |
30 void file_data_unref_debug(const gchar *file, gint line, FileData *fd); | |
31 #define file_data_ref(fd) file_data_ref_debug(__FILE__, __LINE__, fd) | |
32 #define file_data_unref(fd) file_data_unref_debug(__FILE__, __LINE__, fd) | |
33 #else | |
24 FileData *file_data_ref(FileData *fd); | 34 FileData *file_data_ref(FileData *fd); |
25 void file_data_unref(FileData *fd); | 35 void file_data_unref(FileData *fd); |
36 #endif | |
26 | 37 |
27 void file_data_increment_version(FileData *fd); | 38 void file_data_increment_version(FileData *fd); |
28 | 39 |
29 gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest); | 40 gboolean file_data_add_change_info(FileData *fd, FileDataChangeType type, const gchar *src, const gchar *dest); |
30 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd); | 41 void file_data_change_info_free(FileDataChangeInfo *fdci, FileData *fd); |