Bug 109180

Summary: [GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
Product: WebKit Reporter: Tomas Popela <tpopela>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, haraken, japhet, mrobinson, ojan.autocc, webkit.review.bot, xan.lopez, zan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch
none
Disabled the add(File) function in CodeGeneratorGObject.pm
xan.lopez: review-
Disabled the webkit_dom_data_transfer_item_list_add function in CodeGeneratorGObject.pm none

Tomas Popela
Reported 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.
Attachments
Proposed patch (2.40 KB, patch)
2013-02-07 05:50 PST, Tomas Popela
no flags
Disabled the add(File) function in CodeGeneratorGObject.pm (2.37 KB, patch)
2013-02-08 01:06 PST, Tomas Popela
xan.lopez: review-
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
Tomas Popela
Comment 1 2013-02-07 05:50:55 PST
Created attachment 187077 [details] Proposed patch
Zan Dobersek
Comment 2 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.
Tomas Popela
Comment 3 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
Xan Lopez
Comment 4 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.
Tomas Popela
Comment 5 2013-02-09 05:35:02 PST
Created attachment 187427 [details] Disabled the webkit_dom_data_transfer_item_list_add function in CodeGeneratorGObject.pm
Xan Lopez
Comment 6 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.
WebKit Review Bot
Comment 7 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>
WebKit Review Bot
Comment 8 2013-02-12 11:28:59 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.