diff options
Diffstat (limited to 'psutil/_psutil_common.h')
-rw-r--r-- | psutil/_psutil_common.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/psutil/_psutil_common.h b/psutil/_psutil_common.h index cb0b399d..d8b691d4 100644 --- a/psutil/_psutil_common.h +++ b/psutil/_psutil_common.h @@ -101,9 +101,17 @@ PyObject* PyErr_SetFromOSErrnoWithSyscall(const char *syscall); // ==================================================================== PyObject* psutil_set_testing(PyObject *self, PyObject *args); -void psutil_debug(const char* format, ...); int psutil_setup(void); + +// Print a debug message on stderr. + +#define psutil_debug(...) do { \ + fprintf(stderr, "psutil-debug [%s:%d]> ", __FILE__, __LINE__); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n");} while(0) + + // ==================================================================== // --- BSD // ==================================================================== |