diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2023-05-04 16:37:57 +0200 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2023-05-15 18:56:09 +0000 |
commit | d42c42d999ecc0bfc3adfd684f1dc4b6960a4d9d (patch) | |
tree | e9332e214e2c5ad2f946336e475ed171f5cc3607 | |
parent | 0098e306026ba5d0d1c4e4d975c06e9016502dfa (diff) | |
download | dbus-d42c42d999ecc0bfc3adfd684f1dc4b6960a4d9d.tar.gz |
dbus-spawn-win: use `_DBUS_FUNCTION_NAME` instead of `__FUNCTION__`
dbus-internals.h already defines a macro which expands to the name
of the current function based on C standard version, etc. So use
that instead of hard-coding `__FUNCTION__`.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
-rw-r--r-- | dbus/dbus-spawn-win.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dbus/dbus-spawn-win.c b/dbus/dbus-spawn-win.c index 3b4bc052..5ad4fe5f 100644 --- a/dbus/dbus-spawn-win.c +++ b/dbus/dbus-spawn-win.c @@ -5,7 +5,7 @@ #if !defined(SPAWN_DEBUG) || defined(_MSC_VER) #define PING() #else -#define PING() fprintf (stderr, "%s:%s:%d\n", __FILE__, __FUNCTION__, __LINE__); fflush (stderr) +#define PING() fprintf (stderr, "%s:%s:%d\n", __FILE__, _DBUS_FUNCTION_NAME, __LINE__); fflush (stderr) #endif #include <stdio.h> @@ -107,7 +107,7 @@ _dbus_babysitter_new (void) old_refcount = _dbus_atomic_inc (&sitter->refcount); - _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount+1, __FUNCTION__); + _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount+1, _DBUS_FUNCTION_NAME); sitter->child_handle = NULL; @@ -141,7 +141,7 @@ _dbus_babysitter_ref (DBusBabysitter *sitter) old_refcount = _dbus_atomic_inc (&sitter->refcount); _dbus_assert (old_refcount > 0); - _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount+1, __FUNCTION__); + _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount+1, _DBUS_FUNCTION_NAME); return sitter; } @@ -182,7 +182,7 @@ _dbus_babysitter_unref (DBusBabysitter *sitter) old_refcount = _dbus_atomic_dec (&sitter->refcount); _dbus_assert (old_refcount > 0); - _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount-1, __FUNCTION__); + _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount-1, _DBUS_FUNCTION_NAME); if (old_refcount == 1) { |