Bug 19552 - JavaScriptCore headers use C++ style comments
Summary: JavaScriptCore headers use C++ style comments
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-15 06:01 PDT by Christian Dywan
Modified: 2008-06-16 06:53 PDT (History)
0 users

See Also:


Attachments
Use only C style comments in public API headers (4.98 KB, patch)
2008-06-15 06:03 PDT, Christian Dywan
no flags Details | Formatted Diff | Diff
Use only C style comments, including CF and BSTR headers (7.29 KB, patch)
2008-06-15 08:00 PDT, Christian Dywan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dywan 2008-06-15 06:01:07 PDT
The JavaScriptCore API is basically usable from C. However the public headers make use of C++ style "//" comments. That means only compilers supporting that part of C99 or particularly support for C++ style comments can parse these headers.
Comment 1 Christian Dywan 2008-06-15 06:03:31 PDT
Created attachment 21710 [details]
Use only C style comments in public API headers

This patch replaces C++ style comments with C style comments in files that are relevant to public C API, which is JavaScript.h and all headers it includes.
Comment 2 Christian Dywan 2008-06-15 08:00:48 PDT
Created attachment 21712 [details]
Use only C style comments, including CF and BSTR headers

Updated patch, including CF and BSTR headers. Also the "mode" lines should now say "c" instead of "c++" where appropriate.
Comment 3 Sam Weinig 2008-06-15 10:24:59 PDT
Comment on attachment 21712 [details]
Use only C style comments, including CF and BSTR headers

This needs a ChangeLog.
Comment 4 Darin Adler 2008-06-15 10:41:41 PDT
I don't think it's good for public header to have mode lines.
Comment 5 Christian Dywan 2008-06-15 12:01:35 PDT
> I don't think it's good for public header to have mode lines.

I tend to agree here yet left them here because virtually all source files have them at the moment.

I will not commit for a few hours to see if there are others who would agree with removing the mode files entirely. Opinions welcome.
Comment 6 Alexey Proskuryakov 2008-06-15 17:17:00 PDT
Yes, please remove the mode lines.
Comment 7 Christian Dywan 2008-06-16 06:52:46 PDT
Comment on attachment 21712 [details]
Use only C style comments, including CF and BSTR headers

Committed in revision 34599. All mode lines were removed entierly.