mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-23 19:24:38 +00:00
6cbad14721
Our GObject structs should be internal API. In which case, we should embed the private data in the struct themselves (`_priv`) and use the _NM_GET_PRIVATE() macro. The advantage is better debugability because following G_TYPE_INSTANCE_GET_PRIVATE() in the debugger is very cumbersome. Another (less relevant) advantage is better performance. Thus, warn about uses of g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE(). Note that if the struct and is in a header file (which is usually only necessary when subclassing the type), then the private data should be an opaque pointer `_priv` instead, and we should use the _NM_GET_PRIVATE_PTR() macro. In that case, the use of g_type_class_add_private() and G_TYPE_INSTANCE_GET_PRIVATE() is correct and the warning is false. But this is only a warning, for the unusual case where we have deep object hierarchies. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1396 |
||
---|---|---|
.. | ||
nm-in-container.d | ||
btmodem.pl | ||
checkpatch-feature-branch.sh | ||
checkpatch-git-post-commit-hook | ||
checkpatch.pl | ||
code-style-git-post-commit-hook | ||
find-backports | ||
git-subtree-reimport.sh | ||
modemu.pl | ||
nm-ci-patch-gtkdoc.sh | ||
nm-ci-run.sh | ||
nm-code-format-container.sh | ||
nm-code-format.sh | ||
nm-copr-build-nm-git-bundle.sh | ||
nm-copr-build.sh | ||
nm-import-openconnect | ||
nm-import-openvpn | ||
nm-import-vpnc | ||
nm-in-container.sh | ||
NM-log | ||
nm-python-black-format.sh | ||
nm-setup-git.sh | ||
test-create-many-device-setup.sh | ||
test-macsec | ||
test-ppp.sh | ||
test-prefix-delegation.sh |