Bug 109180 - [GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
Summary: [GTK][Introspection] GObject bindings for DataTransferItemList - one add() me...
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: 2013-02-07 05:44 PST by Tomas Popela
Modified: 2013-02-12 11:28 PST (History)
8 users (show)

See Also:


Attachments
Proposed patch (2.40 KB, patch)
2013-02-07 05:50 PST, Tomas Popela
no flags Details | Formatted Diff | Diff
Disabled the add(File) function in CodeGeneratorGObject.pm (2.37 KB, patch)
2013-02-08 01:06 PST, Tomas Popela
xan.lopez: review-
Details | Formatted Diff | Diff
Disabled the webkit_dom_data_transfer_item_list_add function in CodeGeneratorGObject.pm (2.40 KB, patch)
2013-02-09 05:35 PST, Tomas Popela
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Popela 2013-02-07 05:44:08 PST
When compiling WebKit with --enable-introspection and generating GObject bindings for DataTransferItemList we must remove one add() method, because GObject is based on C and C does not allow two functions with the same name.
Comment 1 Tomas Popela 2013-02-07 05:50:55 PST
Created attachment 187077 [details]
Proposed patch
Comment 2 Zan Dobersek 2013-02-07 07:52:35 PST
Comment on attachment 187077 [details]
Proposed patch

Rather than changing the IDL file you should skip the function in the CodeGeneratorGObject.pm module, in the SkipFunction method.

Given the name of the function you're trying to avoid is quite generic, I'd recommend expanding the SkipFunction method to also accept the name of the interface the function belongs to. It's pretty straightforward from there on, returning 1 from that method (and thus skipping the function) if the function from the 'DataTransferItemList' interface has the name 'add' and the number of parameters equals 1.
Comment 3 Tomas Popela 2013-02-08 01:06:02 PST
Created attachment 187263 [details]
Disabled the add(File) function in CodeGeneratorGObject.pm

Disabled the add(File) function in CodeGeneratorGObject.pm instead of in DataTransferItemList.idl
Comment 4 Xan Lopez 2013-02-08 06:23:42 PST
Comment on attachment 187263 [details]
Disabled the add(File) function in CodeGeneratorGObject.pm

As Zan says I think 'add' is too generic to skip it merely by its name, so we should expand the method to check for the interface name and only do this for the DataTransferItemList case.
Comment 5 Tomas Popela 2013-02-09 05:35:02 PST
Created attachment 187427 [details]
Disabled the webkit_dom_data_transfer_item_list_add function in CodeGeneratorGObject.pm
Comment 6 Xan Lopez 2013-02-12 11:20:08 PST
Comment on attachment 187427 [details]
Disabled the webkit_dom_data_transfer_item_list_add function in CodeGeneratorGObject.pm

OK, good enough.
Comment 7 WebKit Review Bot 2013-02-12 11:28:55 PST
Comment on attachment 187427 [details]
Disabled the webkit_dom_data_transfer_item_list_add function in CodeGeneratorGObject.pm

Clearing flags on attachment: 187427

Committed r142646: <http://trac.webkit.org/changeset/142646>
Comment 8 WebKit Review Bot 2013-02-12 11:28:59 PST
All reviewed patches have been landed.  Closing bug.