about summary refs log tree commit diff
path: root/src/libnm-core-impl/nm-setting.c
diff options
context:
space:
mode:
authorJeremy Bicha <jeremy.bicha@canonical.com>2022-11-28 16:28:37 -0500
committerJeremy Bicha <jeremy.bicha@canonical.com>2022-11-28 16:28:52 -0500
commit23b72b08c0e0079ce1c6e6daa5b2a95602290cf3 (patch)
tree423b7ab020011c905b18e4706558537d01758b8e /src/libnm-core-impl/nm-setting.c
parent54a11b421d2f5e43f9c88eb38a0a5992e9636290 (diff)
parentdbc388c3d1132f291cf4d62455d77e71d0918dcc (diff)
Merge tag 'debian/1.40.4-1' into ubuntu/master
network-manager Debian release 1.40.4-1
Diffstat (limited to 'src/libnm-core-impl/nm-setting.c')
-rw-r--r--src/libnm-core-impl/nm-setting.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/libnm-core-impl/nm-setting.c b/src/libnm-core-impl/nm-setting.c
index 35070bae..b6f72137 100644
--- a/src/libnm-core-impl/nm-setting.c
+++ b/src/libnm-core-impl/nm-setting.c
@@ -30,6 +30,20 @@
 
 /*****************************************************************************/
 
+/*
+ * We use literal numbers in the header (as opposed to e.g.
+ * (1 << (1 + G_PARAM_USER_SHIFT))), because g-ir-scanner sometimes gets
+ * confused by unknown tokens and silently treats them as zero:
+ * https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/366
+ */
+
+G_STATIC_ASSERT(G_PARAM_USER_SHIFT == 8);
+G_STATIC_ASSERT(NM_SETTING_PARAM_REQUIRED == (1 << (1 + G_PARAM_USER_SHIFT)));
+G_STATIC_ASSERT(NM_SETTING_PARAM_SECRET == (1 << (2 + G_PARAM_USER_SHIFT)));
+G_STATIC_ASSERT(NM_SETTING_PARAM_FUZZY_IGNORE == (1 << (3 + G_PARAM_USER_SHIFT)));
+
+/*****************************************************************************/
+
 typedef struct {
     GHashTable  *hash;
     const char **names;
@@ -3847,7 +3861,7 @@ nm_setting_option_clear_by_name(NMSetting *setting, NMUtilsPredicateStr predicat
  * Returns: (transfer none): the #GVariant or %NULL if the option
  *   is not set.
  *
- * Since: 1.26.
+ * Since: 1.26
  */
 GVariant *
 nm_setting_option_get(NMSetting *setting, const char *opt_name)