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 731299 - [regression] Wrong function name for gtk_selection_data_get_data
[regression] Wrong function name for gtk_selection_data_get_data
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-06-05 22:42 UTC by Christoph Reiter (lazka)
Modified: 2014-06-12 19:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix gtk_selection_data_get_data annotations (1.04 KB, patch)
2014-06-11 20:18 UTC, Dieter Verfaillie
accepted-commit_now Details | Review

Description Christoph Reiter (lazka) 2014-06-05 22:42:35 UTC
This is with glib/gtk trunk. 3.12 has it correct.

My gtk+ gir contains this; name should be "get_data" instead of "selection_data_get_data":

<function name="selection_data_get_data"
              c:identifier="gtk_selection_data_get_data"
              shadowed-by="get_data_with_length"
              moved-to="SelectionData.get_data"
              version="2.14"
              introspectable="0">
      <doc xml:space="preserve">Retrieves the raw data of the selection.</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">the raw data of the selection.</doc>
        <type name="guint8" c:type="const guchar*"/>
      </return-value>
Comment 1 Dieter Verfaillie 2014-06-08 21:04:58 UTC
Looks like https://git.gnome.org/browse/gtk+/commit/gtk/gtkselection.c?id=e596e58c51a2f25c8ff4d35dea2bb77751b2f105
might be the cause ?
Comment 2 Evan Nemerson 2014-06-08 21:19:54 UTC
(In reply to comment #1)
> Looks like
> https://git.gnome.org/browse/gtk+/commit/gtk/gtkselection.c?id=e596e58c51a2f25c8ff4d35dea2bb77751b2f105
> might be the cause ?

It might trigger a bug in G-I, but AFAICT the annotations are right.
Comment 3 Christoph Reiter (lazka) 2014-06-08 21:25:31 UTC
(In reply to comment #1)
> Looks like
> https://git.gnome.org/browse/gtk+/commit/gtk/gtkselection.c?id=e596e58c51a2f25c8ff4d35dea2bb77751b2f105
> might be the cause ?

Yes, thanks, reverting it fixes it.
Comment 4 Simon Feltman 2014-06-08 21:50:15 UTC
(In reply to comment #2)
> It might trigger a bug in G-I, but AFAICT the annotations are right.

Perhaps the annotation was intended for the return value not the instance argument?

https://git.gnome.org/browse/gtk+/tree/gtk/gtkselection.c#n1216
Comment 5 Evan Nemerson 2014-06-08 21:57:52 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > It might trigger a bug in G-I, but AFAICT the annotations are right.
> 
> Perhaps the annotation was intended for the return value not the instance
> argument?
> 
> https://git.gnome.org/browse/gtk+/tree/gtk/gtkselection.c#n1216

Ah, looks like you're right.  Does moving the annotation (instead of removing it) fix the issue as well?
Comment 6 Dieter Verfaillie 2014-06-11 20:18:20 UTC
Created attachment 278286 [details] [review]
Fix gtk_selection_data_get_data annotations

Looks like it does. With the patch I get:

      <method name="get_data"
              c:identifier="gtk_selection_data_get_data"
              shadowed-by="get_data_with_length"
              version="2.14"
              introspectable="0">
        <doc xml:space="preserve">Retrieves the raw data of the selection.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the raw data of the selection.</doc>
          <array zero-terminated="0" c:type="guchar*">
            <type name="guint8"/>
          </array>
        </return-value>
        <parameters>
          <instance-parameter name="selection_data" transfer-ownership="none">
            <doc xml:space="preserve">a pointer to a
  #GtkSelectionData-struct.</doc>
            <type name="SelectionData" c:type="const GtkSelectionData*"/>
          </instance-parameter>
        </parameters>
      </method>
Comment 7 Christoph Reiter (lazka) 2014-06-12 10:46:46 UTC
I can confirm that the patch fixes the problem and get_data() works as before using PyGObject.
Comment 8 Simon Feltman 2014-06-12 18:16:06 UTC
Review of attachment 278286 [details] [review]:

LGTM. There is a grammar problem in the commit message though: ".. annotations where.." should be ".. annotations were..".
Comment 9 Dieter Verfaillie 2014-06-12 19:04:10 UTC
Thanks, pushed with fixed grammar problem and fixed author email as daa8b48