This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix h2xs enum handling with C++ comments
authorNiko Tyni <ntyni@debian.org>
Sun, 19 Oct 2008 20:21:30 +0000 (23:21 +0300)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 19 Jan 2009 14:00:51 +0000 (15:00 +0100)
commitc7c8b664ff1d92154d9e97e6e8ea84f7cc24991a
tree0bff334bb5780e06c468fe62b032e123bac9ca80
parentae209c08ded4e79538972a4ae3d5103a05678ba9
Fix h2xs enum handling with C++ comments

Contrary to the comment in the code, h2xs mishandles enums that
contain C++ style comments.

An example of a failing header:
enum {
    A = -1, // negative one
            // with more comments
    B = -2, // negative two
    C = -3 // negative two
};

which generates exported constants for 'A' and 'negative'.

The patch is slightly modified from the one by Daniel Burr in
http://bugs.debian.org/320286
utils/h2xs.PL