Bug 68256

Summary: CodeGeneratorGObject should use C++ style comments for ENABLE guards
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED WONTFIX    
Severity: Normal CC: darin, ossy, rniwa, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 68299    
Bug Blocks:    
Attachments:
Description Flags
Patch darin: review+

Description Adam Barth 2011-09-16 10:33:05 PDT
CodeGeneratorGObject should use C++ style comments for ENABLE guards
Comment 1 Adam Barth 2011-09-16 10:34:27 PDT
Created attachment 107680 [details]
Patch
Comment 2 Darin Adler 2011-09-16 10:55:12 PDT
Comment on attachment 107680 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=107680&action=review

> Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm:58
> + * This file is part of the WebKit open source project.
> + * This file has been generated by generate-bindings.pl. DO NOT MODIFY!

Not specific to this patch, really, but I don’t think that adding stars to every line improves this comment. In fact, I think this format should be considered an anti-pattern in the future. Those additional stars make it slightly easier to spot that it's a comment, but also make comments harder to edit with any non-advanced editing tools.

If we really want something on every line, then we should just use // comments. The whole benefit of /* */ comments is that they are multiline without requiring additional characters on every line.
Comment 3 Adam Barth 2011-09-16 11:02:15 PDT
Ok.  I'll change them to //, which is also a common style for license blocks in the project.  I'm not sure it's such a big deal for these generated files.  Mostly it was the ENABLE-guard comments that I bumped into.
Comment 4 Adam Barth 2011-09-16 11:05:28 PDT
Committed r95304: <http://trac.webkit.org/changeset/95304>
Comment 5 Ryosuke Niwa 2011-09-16 18:34:15 PDT
I had to roll this patch out because GTK+ pulls the derived headers in main.c.
Comment 6 Adam Barth 2011-09-16 22:06:49 PDT
Whatever.  This is too much work for too little benefit.
Comment 7 Ryosuke Niwa 2011-09-16 22:26:31 PDT
(In reply to comment #6)
> Whatever.  This is too much work for too little benefit.

Yeah, I completely agree.