glib-aux: add code comment to NM_UUID_INIT()

`NM_UUID_INIT(00, 09, 01, ...)` would look as if the values are
octal numbers. That is not the case. The macro mangles them,
so that the look like the UUID in string form "000901...".

This is a bit odd. Maybe more confusing than helpful. Or maybe helpful?
This commit is contained in:
Thomas Haller 2022-09-28 13:10:14 +02:00
parent e7582e7dd3
commit ee32de41cf
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -9,6 +9,9 @@ typedef struct _NMUuid {
#define NM_UUID_INIT_ZERO() ((NMUuid){.uuid = {0}})
/* Beware, the 16 macro arguments are two hex-digits, not plain numbers. The macro
* will automatically add the "0x". In particular, "09" is not an octal number, it's
* 0x09. This oddity is so that the arguments look very much like the UUID in string form. */
#define NM_UUID_INIT(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) \
((NMUuid){ \
.uuid = {(0x##a0), \