registry: hide again the WpCore struct, separate registry and core better

This commit is contained in:
George Kiagiadakis
2020-02-17 18:31:03 +02:00
parent 0b55729e06
commit c46a48d13f
9 changed files with 75 additions and 69 deletions

View File

@@ -87,10 +87,12 @@ wp_configuration_get_instance (WpCore *core)
g_return_val_if_fail (WP_IS_CORE (core), NULL);
self = wp_core_find_object (core, (GEqualFunc) WP_IS_CONFIGURATION, NULL);
self = wp_registry_find_object (wp_core_get_registry (core),
(GEqualFunc) WP_IS_CONFIGURATION, NULL);
if (!self) {
self = g_object_new (WP_TYPE_CONFIGURATION, NULL);
wp_core_register_object (core, g_object_ref (self));
wp_registry_register_object (wp_core_get_registry (core),
g_object_ref (self));
}
return self;