mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-02 11:56:38 +02:00
gmacros: Add G_GNUC_STRFTIME macro
Analogous to G_GNUC_PRINTF and G_GNUC_SCANF, to annotate functions similar to strftime. https://gitlab.gnome.org/GNOME/glib/issues/1575
This commit is contained in:
17
glib/docs.c
17
glib/docs.c
@@ -2359,6 +2359,23 @@
|
||||
* for details.
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_GNUC_STRFTIME:
|
||||
* @format_idx: the index of the argument corresponding to
|
||||
* the format string (the arguments are numbered from 1)
|
||||
*
|
||||
* Expands to the GNU C strftime format function attribute if the compiler
|
||||
* is gcc. This is used for declaring functions which take a format argument
|
||||
* which is passed to strftime() or an API implementing its formats. It allows
|
||||
* the compiler check the format passed to the function.
|
||||
*
|
||||
* See the
|
||||
* [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288)
|
||||
* for details.
|
||||
*
|
||||
* Since: 2.60
|
||||
*/
|
||||
|
||||
/**
|
||||
* G_GNUC_FORMAT:
|
||||
* @arg_idx: the index of the argument
|
||||
|
Reference in New Issue
Block a user