exported-object: refactor list of interfaces from GSList to an array
NMExportedObject is the center of every D-Bus exported object in NetworkManager's core. It makes sense to optimize it. Transform the GSList of interfaces to be a array. The array is still allocated via the slice allocator (as we expect that there are only few types in the list). This saves the overhead to allocate a GSList item for each entry. Another advantage is that the interfaces list is now strongly typed instead of an opaque data pointer.
This commit is contained in:
@@ -74,7 +74,6 @@ const char *nm_exported_object_export (NMExportedObject *self);
|
||||
const char *nm_exported_object_get_path (NMExportedObject *self);
|
||||
gboolean nm_exported_object_is_exported (NMExportedObject *self);
|
||||
void nm_exported_object_unexport (NMExportedObject *self);
|
||||
GSList * nm_exported_object_get_interfaces (NMExportedObject *self);
|
||||
GDBusInterfaceSkeleton *nm_exported_object_get_interface_by_type (NMExportedObject *self, GType interface_type);
|
||||
|
||||
void _nm_exported_object_clear_and_unexport (NMExportedObject **location);
|
||||
|
Reference in New Issue
Block a user