Re: glib-mkenums workaround for Cygwin Perl 5.6.1 bug
- From: Owen Taylor <otaylor redhat com>
- To: Tor Lillqvist <tml iki fi>
- Cc: gtk-devel-list gnome org
- Subject: Re: glib-mkenums workaround for Cygwin Perl 5.6.1 bug
- Date: 05 Dec 2001 18:55:07 -0500
Tor Lillqvist <tml iki fi> writes:
> For some reason, Perl 5.6.1 on Cygwin doesn't like a regexp that
> occurs in glib-mkenums (three times). It crashes (would dump core if
> there was such a concept on Cygwin). I know it's a bit silly to add
> workarounds for random bugs in other software, but this is only three
> lines, and doesn't make the code any harder to read... Ok to commit
> this?
The was a discussion of this some time ago:
http://mail.gnome.org/archives/gtk-devel-list/2001-September/msg00312.html
in particular has my comments about fixing it, but I guess nothing ever got
applied.
I don't think your fix quite works - it says that an unclosed comment is:
'/*' followed by any numbre of non-* characters followed by any number of *
Or:
'/**' followed by any number of characters other than / or * followed
by any number of *
Regards,
Owen
> Index: gobject/glib-mkenums.in
> ===================================================================
> RCS file: /cvs/gnome/glib/gobject/glib-mkenums.in,v
> retrieving revision 1.4
> diff -u -2 -r1.4 glib-mkenums.in
> --- gobject/glib-mkenums.in 2001/11/18 17:03:33 1.4
> +++ gobject/glib-mkenums.in 2001/12/05 21:09:28
> @@ -33,5 +33,5 @@
>
> # read lines until comment end is matched
> - while (m@/\*([^*]|\*[^/*])*\**$ x) {
> + while (m@/\*[^*]*\**$ x || m@/\*\*[^/*]*\**$ x) {
> my $new;
> defined ($new = <>) || die "Unmatched comment in $ARGV";
> @@ -62,5 +62,5 @@
>
> # read lines until comment end is matched
> - while (m@/\*([^*]|\*[^/*])*\**$ x) {
> + while (m@/\*[^*]*\**$ x || m@/\*\*[^/*]*\**$ x) {
> my $new;
> defined ($new = <>) || die "Unmatched comment in $file_name";
> @@ -214,5 +214,5 @@
>
> # read lines until comment end is matched
> - while (m@/\*([^*]|\*[^/*])*\**$ x) {
> + while (m@/\*[^*]*\**$ x || m@/\*\*[^/*]*\**$ x) {
> my $new;
> defined ($new = <>) || die "Unmatched comment in $ARGV";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]