gtask: Add g_task_set_static_name()

Similar to g_source_set_static_name, this avoids
strdup overhead for debug-only information in
possibly hot code paths.

We also add a macro wrapper for g_task_set_name that
uses __builtin_constant_p to decide whether to use
g_task_set_name or g_task_set_static_name.
This commit is contained in:
Matthias Clasen
2022-08-27 21:34:58 -04:00
committed by Philip Withnall
parent 794ee60306
commit 99c7d60869
3 changed files with 50 additions and 7 deletions

View File

@@ -4562,6 +4562,7 @@ g_task_set_check_cancellable
g_task_set_return_on_cancel
g_task_set_source_tag
g_task_set_name
g_task_set_static_name
<SUBSECTION>
g_task_report_error
g_task_report_new_error