Mercurial > pidgin.yaz
diff libpurple/debug.c @ 15985:6dc5dc83a61b
Add a whimpy ui op to the debug API that returns TRUE if debugging
is turned on in the UI. This allows the core to avoid having a
call to g_strdup_vprintf() for each debug message when debugging is
turned off. The change should provide a very very small speed
improvement, since we tend to print a lot of debug output.
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Tue, 03 Apr 2007 06:26:20 +0000 |
| parents | 32c366eeeb99 |
| children | 4999bbc52881 |
line wrap: on
line diff
--- a/libpurple/debug.c Mon Apr 02 00:38:21 2007 +0000 +++ b/libpurple/debug.c Tue Apr 03 06:26:20 2007 +0000 @@ -53,7 +53,8 @@ ops = purple_debug_get_ui_ops(); - if (!debug_enabled && ((ops == NULL) || (ops->print == NULL))) + if (!debug_enabled && ((ops == NULL) || (ops->print == NULL) || + (ops->is_enabled && !ops->is_enabled(level, category)))) return; arg_s = g_strdup_vprintf(format, args);
