mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-04 10:16:17 +01:00
gmessages: Add nullable annotation for log_domain
in GLogFunc
Add a missing `(nullable)` annotation for the `log_domain` parameter in the `GLogFunc` callback. This ensures consistency with the documentation and usage in functions like `g_log_set_handler`, where `log_domain` can be `NULL`. Without this annotation, the GIR file generated from the C source does not reflect the nullability of `log_domain`, leading to potential issues in language bindings and other introspection-based tools. This change updates the documentation in `glib/gmessages.c` to include the nullable annotation and clarifies the expected behavior of the `GLogFunc` callback. Fixes #3552
This commit is contained in:
parent
b6da230b8f
commit
1691657cb3
@ -129,7 +129,7 @@
|
||||
|
||||
/**
|
||||
* GLogFunc:
|
||||
* @log_domain: the log domain of the message
|
||||
* @log_domain: (nullable): the log domain of the message
|
||||
* @log_level: the log level of the message (including the
|
||||
* fatal and recursion flags)
|
||||
* @message: the message to process
|
||||
@ -143,6 +143,9 @@
|
||||
* code do not need modifying to add a new-line character to the message if the
|
||||
* log handler is changed.
|
||||
*
|
||||
* The `log_domain` parameter can be set to `NULL` or an empty string to use the default
|
||||
* application domain.
|
||||
*
|
||||
* This is not used if structured logging is enabled; see
|
||||
* [Using Structured Logging](logging.html#using-structured-logging).
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user