NetworkManager/contrib
Thomas Haller 5388542fc0
checkpatch: discourage use of API that uses numeric source IDs
The numeric source IDs exist from a time before 2000, when there
was only one "GMainContext" singleton instance. Nowadays, the source
ID is only relative to one GMainContext, and you'd have to track
that association yourself. Als, g_source_remove() requires an additional
hash lookup, when you could simply track the GSource instance from the
start.

This API should not be used anymore. Operate on GSouce instances
direclty and use API like

  nm_clear_g_source_inst()
  nm_g_idle_add_source()
  nm_g_idle_souce_new()
  nm_g_source_attach()
  g_source_attach
  g_source_destroy
  g_source_unref
  etc.

Note that if you don't care about to ever remove a source again, like
scheduling an idle action that should not be cancelled, then

  g_idle_add(callback, user_data);

is fine. It is only problematic to do something with those numeric IDs.
checkpatch.pl would also flag those uses, but these are just warnings
and in the few cases where such a warning is emitted wrongly, it's find
to ignore them.
2021-06-28 13:31:33 +02:00
..
alpine gitlab-ci: install missing packages on Alpine Linux 2020-12-23 10:48:26 +01:00
art/logo artwork: introduce NetworkManager stickers 2019-09-30 17:36:59 +02:00
debian Revert "contrib: no longer install libuuid as build dependency" 2021-05-26 22:16:35 +02:00
editors contrib: add emacs config for hacking on NM 2015-08-11 13:42:26 -04:00
fedora core: add infrastructure for spawning a helper process 2021-06-11 21:43:12 +02:00
scripts checkpatch: discourage use of API that uses numeric source IDs 2021-06-28 13:31:33 +02:00