X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/bb5f99272ae78a2ddc07e0a54025baab39d84c49..559bcf15ef66d20d7e8527c690c0b4e5a66b6381:/src/upkg.c diff --git a/src/upkg.c b/src/upkg.c index 5766e8b..c13a867 100644 --- a/src/upkg.c +++ b/src/upkg.c @@ -279,19 +279,12 @@ static int object_info(GTypeModule *pkg, unsigned long idx) if (verbose >= 1) { GParamSpec **props; GObject *obj; - GType type; unsigned n; - type = u_object_module_get_class(package, class); - if (!type) { - printf(" (unknown class)\n"); - return 0; - } - - obj = g_object_new(type, NULL); - - if (u_object_deserialize(obj, upkg, idx) != 0) { - g_object_unref(obj); + obj = u_object_new_from_package(upkg, idx); + if (!obj) { + fprintf(stderr, "%s: failed to load object.\n", + progname); return -1; }