Port rpmostreed-os-experimental to C++

Prep for using https://cxx.rs/
This commit is contained in:
Colin Walters 2020-12-21 16:08:51 +00:00 committed by OpenShift Merge Robot
parent 1d610604a2
commit 509ea0dbe1
2 changed files with 3 additions and 6 deletions

View File

@ -49,7 +49,7 @@ librpmostreed_sources = \
src/daemon/rpmostreed-os.h \ src/daemon/rpmostreed-os.h \
src/daemon/rpmostreed-os.cxx \ src/daemon/rpmostreed-os.cxx \
src/daemon/rpmostreed-os-experimental.h \ src/daemon/rpmostreed-os-experimental.h \
src/daemon/rpmostreed-os-experimental.c \ src/daemon/rpmostreed-os-experimental.cxx \
$(NULL) $(NULL)
dbusconf_DATA = $(srcdir)/src/daemon/org.projectatomic.rpmostree1.conf dbusconf_DATA = $(srcdir)/src/daemon/org.projectatomic.rpmostree1.conf

View File

@ -179,15 +179,12 @@ rpmostreed_osexperimental_new (OstreeSysroot *sysroot,
OstreeRepo *repo, OstreeRepo *repo,
const char *name) const char *name)
{ {
RpmostreedOSExperimental *obj = NULL;
g_autofree char *path = NULL;
g_return_val_if_fail (OSTREE_IS_SYSROOT (sysroot), NULL); g_return_val_if_fail (OSTREE_IS_SYSROOT (sysroot), NULL);
g_return_val_if_fail (name != NULL, NULL); g_return_val_if_fail (name != NULL, NULL);
path = rpmostreed_generate_object_path (BASE_DBUS_PATH, name, NULL); g_autofree char *path = rpmostreed_generate_object_path (BASE_DBUS_PATH, name, NULL);
obj = g_object_new (RPMOSTREED_TYPE_OSEXPERIMENTAL, NULL); auto obj = (RpmostreedOSExperimental *)g_object_new (RPMOSTREED_TYPE_OSEXPERIMENTAL, NULL);
rpmostreed_daemon_publish (rpmostreed_daemon_get (), path, FALSE, obj); rpmostreed_daemon_publish (rpmostreed_daemon_get (), path, FALSE, obj);