+static int decode_object_property(UObject *uo, GValue *val, unsigned long len)
+{
+ struct u_object_priv *priv = U_OBJECT_GET_PRIV(uo);
+ GObject *obj = NULL;
+ long index;
+ int rc;
+
+ rc = upkg_decode_index(&index, priv->buf+len, priv->nbuf-len);
+ if (rc == 0 || index == 0)
+ return -1;
+
+ if (index < 0) {
+ fprintf(stderr, "Imports not supported yet.\n");
+ } else {
+ obj = u_object_new_from_package(uo->pkg, index-1);
+ }
+
+ g_value_init(val, U_TYPE_OBJECT);
+ g_value_take_object(val, obj);
+ return 0;
+}
+
+/*
+ * XXX: I must have been smoking the happy plant when I started property
+ * decoding. The tracking of various sizes in these functions makes no
+ * sense at all.
+ */
+