Bug 134476 - [GTK] Annotations for WebResource.get_data produce wrong signature in Vala binding
Summary: [GTK] Annotations for WebResource.get_data produce wrong signature in Vala bi...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-30 17:51 PDT by nilclass
Modified: 2014-07-01 02:11 PDT (History)
9 users (show)

See Also:


Attachments
[GTK] fix WebKit.WebResource.get_data_finish return value annotations (1.65 KB, patch)
2014-06-30 18:06 PDT, Evan Nemerson
cgarcia: review+
cgarcia: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (2.04 KB, patch)
2014-07-01 01:32 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nilclass 2014-06-30 17:51:16 PDT
The get_data method of WebKit.WebResource is currently unusable from Vala code, because the method signature in the .vapi file is incorrect.

Currently the generated Vala signature is:

  public async uint8 get_data (GLib.Cancellable? cancellable, out size_t length) throws GLib.Error;

the expected signature is:

  [CCode (array_length_type = "size_t")]
  public async uint8[] get_data (GLib.Cancellable? cancellable) throws GLib.Error;

I have checked that applying this change to the webkit2gtk-3.0.vapi file manually & linking against webkit2gtk version 2.4.2 works, but I don't have the capacity right now to compile webkit to find out what changes to the annotations are required to reach this result.
If someone could point me to the right documentation, I'd be willing to submit a patch.
Comment 1 Evan Nemerson 2014-06-30 18:06:00 PDT
Created attachment 234132 [details]
[GTK] fix WebKit.WebResource.get_data_finish return value annotations
Comment 2 WebKit Commit Bot 2014-06-30 21:21:32 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Carlos Garcia Campos 2014-07-01 00:14:02 PDT
Comment on attachment 234132 [details]
[GTK] fix WebKit.WebResource.get_data_finish return value annotations

Thanks for the patch. It looks good to me, but you need to fill a changelog entry, see http://www.webkit.org/coding/contributing.html
Comment 4 Carlos Garcia Campos 2014-07-01 01:32:15 PDT
Created attachment 234151 [details]
Patch for landing

Added changelog entry
Comment 5 WebKit Commit Bot 2014-07-01 02:11:19 PDT
Comment on attachment 234151 [details]
Patch for landing

Clearing flags on attachment: 234151

Committed r170633: <http://trac.webkit.org/changeset/170633>
Comment 6 WebKit Commit Bot 2014-07-01 02:11:24 PDT
All reviewed patches have been landed.  Closing bug.