Port rpmostree-libarchive-input-stream to C++

Prep for using https://cxx.rs/
This commit is contained in:
Colin Walters 2020-12-19 18:17:03 +00:00 committed by OpenShift Merge Robot
parent 8bdbc81442
commit 022ff333a3
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ librpmostreepriv_sources = \
src/libpriv/libsd-locale-util.h \ src/libpriv/libsd-locale-util.h \
src/libpriv/libsd-time-util.c \ src/libpriv/libsd-time-util.c \
src/libpriv/libsd-time-util.h \ src/libpriv/libsd-time-util.h \
src/libpriv/rpmostree-libarchive-input-stream.c \ src/libpriv/rpmostree-libarchive-input-stream.cxx \
src/libpriv/rpmostree-libarchive-input-stream.h \ src/libpriv/rpmostree-libarchive-input-stream.h \
$(NULL) $(NULL)

View File

@ -82,9 +82,9 @@ _rpm_ostree_libarchive_input_stream_class_init (RpmOstreeLibarchiveInputStreamCl
PROP_ARCHIVE, PROP_ARCHIVE,
g_param_spec_pointer ("archive", g_param_spec_pointer ("archive",
"", "", "", "",
G_PARAM_READWRITE | (GParamFlags)(G_PARAM_READWRITE |
G_PARAM_CONSTRUCT_ONLY | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS)); G_PARAM_STATIC_STRINGS)));
} }
@ -98,7 +98,7 @@ rpm_ostree_libarchive_input_stream_set_property (GObject *object,
switch (prop_id) switch (prop_id)
{ {
case PROP_ARCHIVE: case PROP_ARCHIVE:
self->priv->archive = g_value_get_pointer (value); self->priv->archive = static_cast<archive*>(g_value_get_pointer (value));
break; break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);