Closed Bug 528863 Opened 10 years ago Closed 7 years ago

[HTML5] Use _h instead of _h__ in include guards in the HTML5 parser

Categories

(Core :: DOM: HTML Parser, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: hsivonen, Assigned: Cykesiopka)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

(Quoting dbaron from bug 514661 comment 25):
> Also, in general, in the include guards in your headers, you should end
> the names of the macros with only a single underscore, since all names
> with two consecutive underscores are reserved to the implementation.
> (See C++, [lib.global.names].)

This pattern occurs in every .h of the HTML5 parser. Replace _h__ with _h_ in every one of them.
Priority: -- → P4
Hi... What would be the necessary steps to fixing this bug?

I assume it involves patching https://hg.mozilla.org/projects/htmlparser/file/tip/translator-src/nu/validator/htmlparser/cpptranslate/HVisitor.java and patching the files under /parser/html in m-c...?

Thanks in advance!
Flags: needinfo?(hsivonen)
Summary: [HTML5] Use _h_ instead of _h__ in include guards in the HTML5 parser → [HTML5] Use _h instead of _h__ in include guards in the HTML5 parser
(In reply to Cykesiopka from comment #1)
> Hi... What would be the necessary steps to fixing this bug?
> 
> I assume it involves patching
> https://hg.mozilla.org/projects/htmlparser/file/tip/translator-src/nu/
> validator/htmlparser/cpptranslate/HVisitor.java and patching the files under
> /parser/html in m-c...?

Correct.
Flags: needinfo?(hsivonen)
Attachment #793831 - Flags: review?(hsivonen)
Attached patch m-c Part v1Splinter Review
This was mostly done via mechanical search and replace as I unfortunately couldn't manage to run the translator...
Attachment #793833 - Flags: review?(hsivonen)
Attachment #793833 - Flags: review?(hsivonen) → review+
Attachment #793831 - Flags: review?(hsivonen) → review+
Assignee: nobody → cykesiopka.bmo
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/e51ff50dea78
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Could someone land attachment 793831 [details] [diff] [review] to https://hg.mozilla.org/projects/htmlparser as well? Thanks in advance!
Keywords: checkin-needed
(In reply to Cykesiopka from comment #7)
> Could someone land attachment 793831 [details] [diff] [review] to
> https://hg.mozilla.org/projects/htmlparser as well? Thanks in advance!

Landed: https://hg.mozilla.org/projects/htmlparser/rev/438214a02e11

Thanks.
Keywords: checkin-needed
Blocks: 920412
You need to log in before you can comment on or make changes to this bug.