File: debug.h

package info (click to toggle)
python-yappi 1.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,612 kB
  • sloc: python: 4,088; ansic: 2,515; makefile: 29
file content (28 lines) | stat: -rw-r--r-- 840 bytes parent folder | download | duplicates (4)
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
#ifndef YDEBUG_H
#define YDEBUG_H

#ifdef DEBUG_CALL
#ifndef _MSC_VER
#define ydprintf(fmt, args...) fprintf(stderr, "[&] [yappi-dbg] " fmt "\n", ## args)
#else
#define ydprintf(fmt, ...) fprintf(stderr, "[&] [yappi-dbg] " fmt "\n", __VA_ARGS__)
#endif
#else
#ifndef _MSC_VER
#define ydprintf(fmt, args...)
#else
#define ydprintf(fmt, ...)
#endif
#endif

#ifndef _MSC_VER
#define yerr(fmt, args...) fprintf(stderr, "[*]	[yappi-err]	" fmt "\n", ## args)
#define yinfo(fmt, args...) fprintf(stderr, "[+] [yappi-info] " fmt "\n", ## args)
#define yprint(fmt, args...) fprintf(stderr, fmt,  ## args)
#else
#define yerr(fmt, ...) fprintf(stderr, "[*]	[yappi-err]	" fmt "\n", __VA_ARGS__)
#define yinfo(fmt, ...) fprintf(stderr, "[+] [yappi-info] " fmt "\n", __VA_ARGS__)
#define yprint(fmt, ...) fprintf(stderr, fmt, __VA_ARGS__)
#endif

#endif