File: debugging.h

package info (click to toggle)
python-bibtex 1.2.4-1.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 392 kB
  • ctags: 613
  • sloc: ansic: 2,834; yacc: 372; python: 247; lex: 175; makefile: 53
file content (30 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef __debugging_h__
#define __debugging_h__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include <stdio.h>

static gchar *
__my_strdup (gchar * text, gchar * file, gint line) {
    gchar * tmp = g_strdup (text);
    fprintf(stderr,"g_strdup: %x %s %d\n", tmp, file, line);
    return tmp;
}

static void
__my_free (gpointer text, gchar *file, gint line) {
    fprintf(stderr,"g_free: %x %s %d\n", text, file, line);
    g_free (text);
}

#define g_strdup(text) __my_strdup (text,__FILE__,__LINE__)
#define g_free(text) __my_free(text,__FILE__,__LINE__)

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* debugging.h */