RESOLVED FIXED 10792
Remove the [Exclude=LANGUAGE] idiom from IDL's and code generators for something better
https://bugs.webkit.org/show_bug.cgi?id=10792
Summary Remove the [Exclude=LANGUAGE] idiom from IDL's and code generators for someth...
Sam Weinig
Reported 2006-09-09 14:16:06 PDT
Bug to track this issue
Attachments
patch (48.55 KB, patch)
2006-09-11 09:01 PDT, Sam Weinig
darin: review+
Eric Seidel (no email)
Comment 1 2006-09-09 14:19:10 PDT
I'm particularly uncomfortable with things like: + [Exclude=JS] DOMString getPropertyShorthand(in DOMString propertyName); + [Exclude=JS] boolean isPropertyImplicit(in DOMString propertyName); where this is being used to exclude obj-c only methods from JavaScript bindings. ObjC and JS are not going to be the only DOM bindings for long. The KDE guys have talked about adding c++ bindings several times. I also expect someone will eventually come along and want to add ruby, or python, or perl or whatever other bindings. We should make this task as easy for them as possible by coding our idls in such a way as to think beyond just js and obj-c.
Timothy Hatcher
Comment 2 2006-09-09 14:20:39 PDT
We could use #ifdefs and preprocess the IDL files per language.
Sam Weinig
Comment 3 2006-09-11 09:01:38 PDT
Created attachment 10500 [details] patch - Replaces [Exclude=LANGUAGE] idiom with preprocessor #if defined(LANGUAGE) idiom. - Assorted whitespace changes to IDL files.
Darin Adler
Comment 4 2006-09-11 09:12:55 PDT
Comment on attachment 10500 [details] patch I think we should consider symbols more like LANGUAGE_JAVASCRIPT and LANGUAGE_OBJECTIVE_C instead of JS and OBJC, to avoid accidental substitution, say if someone had a variable named "JS". I personally like #ifndef X better than #if !defined(X). r=me
Sam Weinig
Comment 5 2006-09-11 10:06:18 PDT
Landed in r16299.
Note You need to log in before you can comment on or make changes to this bug.