GNOME Bugzilla – Bug 788232
Default element-type not set for GByteArray object properties
Last modified: 2018-02-08 12:48:18 UTC
When a GByteArray is found as a function argument, it has its element-type set to guint8 by default. When one is found as a boxed object property, this doesn’t seem to happen, resulting in the following GIR XML: <class name="TlsCertificate" c:symbol-prefix="tls_certificate" c:type="GTlsCertificate" version="2.28" parent="GObject.Object" abstract="1" glib:type-name="GTlsCertificate" glib:get-type="g_tls_certificate_get_type" glib:type-struct="TlsCertificateClass"> … <property name="certificate" version="2.28" writable="1" construct-only="1" transfer-ownership="none"> <array name="GLib.ByteArray"> <type name="gpointer" c:type="gpointer"/> </array> </property> … </class> Whereas the GIR XML for a function argument of type GByteArray is: <parameter name="issuer_raw_dn" transfer-ownership="none"> <array name="GLib.ByteArray" c:type="GByteArray*"> <type name="guint8" c:type="guint8"/> </array> </parameter> In both cases, no (element-type) annotation has been used in the source. This may be related to bug #745001.
I came across a related message thread[1] indicating this is a blocker for using Gcr[2] via introspection: [1]: https://mail.gnome.org/archives/javascript-list/2016-June/msg00002.html [2]: https://developer.gnome.org/gcr/stable/
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gobject-introspection/issues/184.