[libvirt] [PATCH 2/5] remote generator: Fix comment ignoring regex
Matthias Bolte
matthias.bolte at googlemail.com
Tue May 10 18:46:07 UTC 2011
2011/5/9 Eric Blake <eblake at redhat.com>:
> On 05/07/2011 06:28 AM, Matthias Bolte wrote:
>> ---
>> daemon/remote_generator.pl | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/daemon/remote_generator.pl b/daemon/remote_generator.pl
>> index b06e51a..8d62c37 100755
>> --- a/daemon/remote_generator.pl
>> +++ b/daemon/remote_generator.pl
>> @@ -380,7 +380,7 @@ elsif ($opt_b) {
>> } else {
>> push(@args_list, "args->$2");
>> }
>> - } elsif ($args_member =~ m/^\/*/) {
>
> Ignore 0 or more / at the start of a line (which basically meant _every_
> single line that got to this =~ would match, regardless of whether it is
> a comment)...
>
>> + } elsif ($args_member =~ m/^(\/)?\*/) {
>
> vs. ignore literal '/*' or '*' at the start of a line (which catches
> both the start and a line continuation for /* */ comments, but misses //
> comments - then again, we don't use // comments). Looks right to me, so:
>
> ACK.
>
We prefer /* */ comments, don't we? Therefore, the generator turns //
into an error intentionally.
Thanks, pushed.
Matthias
More information about the libvir-list
mailing list