Gdk_clipboard_read_async() mime types gir issue

I have recently observed that for the mime types parameter the Nim bindings do use not char** but only char* what is wrong.

In the Gdk4 gir file we have

          <parameter name="mime_types" transfer-ownership="none">
            <doc xml:space="preserve"
                 line="638">a %NULL-terminated array of mime types to choose from</doc>
            <type name="utf8" c:type="const char**"/>

while for many other functions with utf8 string array like gtk_about_dialog_add_credit_section() we have

          <parameter name="people" transfer-ownership="none">
            <doc xml:space="preserve"
                 line="2337">The people who belong to that section</doc>
            <array c:type="const char**">
              <type name="utf8" c:type="char*"/>

which works fine for the Nim bindings. Is this a bug in the GIR file annotation?

Is it not that easy to detect for the gdk_clipboard_read_async() mime_types parameter that it is a null terminated array of char pointers.

Yes, the parameter is missing a (array zero-terminated=1) annotation. Please, file a bug.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.