Skip to content

g_regex_escape_string: bad GIR: utf8[] -> utf8

Bart Jacobs requested to merge (removed):regex-escape-string-bad-gir into main

The current GIR for this function looks like this, which incorrectly suggests the first parameter is an array of strings:

      <function name="escape_string" c:identifier="g_regex_escape_string">
        <return-value transfer-ownership="full">
          <type name="utf8"/>
        </return-value>
        <parameters>
          <parameter name="string" transfer-ownership="none">
            <array length="1">
              <type name="utf8"/>
            </array>
          </parameter>
          <parameter name="length" transfer-ownership="none">
            <type name="gint32"/>
          </parameter>
        </parameters>
      </function>

The current annotation attempts to express the relationship between the two parameters, but the current introspection annotation syntax does not support expressing this. See discussion in gtk#5547 (closed) .

Merge request reports