diff options
author | Thomas Haller <thaller@redhat.com> | 2019-10-18 08:12:01 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-10-22 10:58:52 +0200 |
commit | 57aa5e2a9df99eb6e6286ae0726cf9f40c5992e6 (patch) | |
tree | 971e3714bc3aaba7c257b719c43725f017db7974 /libnm/nm-remote-connection.h | |
parent | 35b024acaa3a74fc7b8c2fbccd1a5708bfe5cfa8 (diff) | |
download | NetworkManager-57aa5e2a9df99eb6e6286ae0726cf9f40c5992e6.tar.gz |
libnm: hide GObject structs from public API and embed private data
These types are all subclasses of NMObject. These instances are commonly
created by NMClient itself. It makes no sense that a user would
instantiate the type. Much less does it make sense to subclass them.
Hide the object and class structures from public API.
This is an API and ABI break, but of something that is very likely
unused.
This is mainly done to embed the private structure in the object itself.
This has benefits for performance and debugability. But most
importantly, we can obtain a static offset where to access the private data.
That means, we can use the information to access the data pointer
generically, as we will need later.
This is not done for the internal types NMManager, NMRemoteSettings,
and NMDnsManager. These types will be dropped later.
Diffstat (limited to 'libnm/nm-remote-connection.h')
-rw-r--r-- | libnm/nm-remote-connection.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/libnm/nm-remote-connection.h b/libnm/nm-remote-connection.h index ce6eef993d..ed05daad7e 100644 --- a/libnm/nm-remote-connection.h +++ b/libnm/nm-remote-connection.h @@ -33,16 +33,7 @@ G_BEGIN_DECLS /** * NMRemoteConnection: */ -struct _NMRemoteConnection { - NMObject parent; -}; - -typedef struct { - NMObjectClass parent_class; - - /*< private >*/ - gpointer padding[8]; -} NMRemoteConnectionClass; +typedef struct _NMRemoteConnectionClass NMRemoteConnectionClass; GType nm_remote_connection_get_type (void); |