Port rpmostree-composeutil to C++

Prep for using https://cxx.rs
This commit is contained in:
Colin Walters 2020-12-18 21:42:28 +00:00 committed by OpenShift Merge Robot
parent 0571917254
commit b78de32d21
2 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ rpm_ostree_SOURCES = src/app/main.cxx \
src/app/rpmostree-polkit-agent.h \
src/app/rpmostree-builtin-kargs.c \
src/app/rpmostree-compose-builtin-tree.cxx \
src/app/rpmostree-composeutil.c \
src/app/rpmostree-composeutil.cxx \
src/app/rpmostree-composeutil.h \
src/app/rpmostree-builtin-compose.c \
$(NULL)

View File

@ -243,7 +243,7 @@ rpmostree_composeutil_get_treespec (RpmOstreeContext *ctx,
/* at least one of `repos` and `lockfile-repos` should be defined */
if (!json_object_has_member (treedata, "repos") &&
!json_object_has_member (treedata, "lockfile-repos"))
return glnx_null_throw (error, "Treefile has neither \"repos\" nor \"lockfile-repos\" members");
return (RpmOstreeTreespec*)glnx_null_throw (error, "Treefile has neither \"repos\" nor \"lockfile-repos\" members");
if (!treespec_bind_bool (treedata, treespec, "documentation", TRUE, error))
return NULL;
@ -357,7 +357,7 @@ rpmostree_composeutil_finalize_metadata (GHashTable *metadata,
g_variant_unref (orig);
}
return g_steal_pointer (&ret);
return util::move_nullify (ret);
}
/* Implements --write-composejson-to, and also prints values.