Bug 19552

Summary: JavaScriptCore headers use C++ style comments
Product: WebKit Reporter: Christian Dywan <christian>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Use only C style comments in public API headers
none
Use only C style comments, including CF and BSTR headers none

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.