After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788232 - Default element-type not set for GByteArray object properties
Default element-type not set for GByteArray object properties
Status: RESOLVED OBSOLETE
Product: gobject-introspection
Classification: Platform
Component: g-ir-scanner
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-09-27 10:24 UTC by Philip Withnall
Modified: 2018-02-08 12:48 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Withnall 2017-09-27 10:24:35 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.
Comment 1 andrew.g.r.holmes 2017-10-13 08:22:39 UTC
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/
Comment 2 GNOME Infrastructure Team 2018-02-08 12:48:18 UTC
-- 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.