libnm-util: Fix transfer annotations of nm_{connection,setting}_need_secrets()

The various need_secrets() implementation do allocate a fresh GPtrArray, but
add static strings to them without dup'ing. Thus callers must _not_ free the
array elements, only the array itself. Adjust documentation and annotations
accordingly.

Also adjust the corresponding comment in the goi-list-connections.py example.

https://bugzilla.gnome.org/show_bug.cgi?id=698175
This commit is contained in:
Martin Pitt
2013-04-17 07:08:52 +02:00
committed by Dan Winship
parent d5fb24b5b5
commit 6226fb9b59
3 changed files with 10 additions and 12 deletions

View File

@@ -23,10 +23,8 @@ from gi.repository import GObject, NetworkManager, NMClient
# This example asks settings service for all configured connections.
# Unfortunately, at this time since libnm-glib still makes heavy use of
# GValue and GHashTable (rather than GVariant), libnm-glib isn't fully
# usable from GObject Introspection-ready languages. Most functions will
# work fine, but those involving connection secrets (like
# nm_remote_connection_get_secrets() or nm_connection_to_hash()) cause assertion
# failures since pygobject cannot handle complex GHashTable elements.
# usable from GObject Introspection-ready languages. Most functions will
# work fine, but e. g. nm_connection_to_hash() causes assertion failures.
main_loop = None