glib-aux/trivial: fix indentation of code comment

This commit is contained in:
Thomas Haller 2021-07-29 09:33:39 +02:00
parent db41f2afad
commit 38c57ec4b9
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -418,21 +418,21 @@ NM_G_ERROR_MSG(GError *error)
#if _NM_CC_SUPPORT_GENERIC
/* these macros cast (value) to
* - "const char **" (for "MC", mutable-const)
* - "const char *const*" (for "CC", const-const)
* The point is to do this cast, but only accepting pointers
* that are compatible already.
*
* The problem is, if you add a function like g_strdupv(), the input
* argument is not modified (CC), but you want to make it work also
* for "char **". C doesn't allow this form of casting (for good reasons),
* so the function makes a choice like g_strdupv(char**). That means,
* every time you want to call it with a const argument, you need to
* explicitly cast it.
*
* These macros do the cast, but they only accept a compatible input
* type, otherwise they will fail compilation.
*/
* - "const char **" (for "MC", mutable-const)
* - "const char *const*" (for "CC", const-const)
* The point is to do this cast, but only accepting pointers
* that are compatible already.
*
* The problem is, if you add a function like g_strdupv(), the input
* argument is not modified (CC), but you want to make it work also
* for "char **". C doesn't allow this form of casting (for good reasons),
* so the function makes a choice like g_strdupv(char**). That means,
* every time you want to call it with a const argument, you need to
* explicitly cast it.
*
* These macros do the cast, but they only accept a compatible input
* type, otherwise they will fail compilation.
*/
#define NM_CAST_STRV_MC(value) \
(_Generic ((value), \
const char * *: (const char * *) (value), \