Skip Menu |
 

This queue is for tickets about the Unicode-Collate CPAN distribution.

Report information
The Basics
Id: 102024
Status: resolved
Priority: 0/
Queue: Unicode-Collate

People
Owner: Nobody in particular
Requestors: JHI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.10
Fixed in: 1.11

Attachments
0001-Drop-const-casting-of-single-string-literals.patch



Subject: remove extranous const casting
Download (untitled) / with headers
text/plain 339b
Drop const casting of single string literals Should be unnecessary since the arrays are const char* const, and makes at least IRIX cc whine mightily. Tested in a few C and C++ compilers. Also verified by bulk88 not to undo the constifications made for Win32 in rt.cpan.org #101170. Patch attached.
Subject: 0001-Drop-const-casting-of-single-string-literals.patch
From 5bab2e3fc87618bf91a545ead687ab9492d78ec5 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi <jhi@iki.fi> Date: Thu, 5 Feb 2015 16:45:41 -0500 Subject: [PATCH] Drop const casting of single string literals Should be unnecessary since the arrays are const char* const, and makes at least IRIX cc whine mightily. Tested in a few C and C++ compilers. Also verified by bulk88 not to undo the constifications made for Win32 in rt.cpan.org #101170. --- cpan/Unicode-Collate/mkheader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpan/Unicode-Collate/mkheader b/cpan/Unicode-Collate/mkheader index 11f85b6..4954b51 100644 --- a/cpan/Unicode-Collate/mkheader +++ b/cpan/Unicode-Collate/mkheader @@ -114,7 +114,7 @@ my $init = ''; $line =~ s/\s*\z//; next if $line eq ''; $init .= "/*$line*/\n" if $line =~ /^[A-Za-z0-9_.:;@\ \[\]]+\z/; - $init .= "($type)".stringify($line).",\n"; + $init .= stringify($line).",\n"; } $init .= "NULL\n"; # sentinel $init .= "};\n\n"; @@ -167,7 +167,7 @@ EOF printf "static const $type ${head}_%02x_%02x [256] = {\n", $p, $r; for (my $c = 0; $c < 256; $c++) { print "\t", defined $val{$p}{$r}{$c} - ? "($type)".$val{$p}{$r}{$c} + ? $val{$p}{$r}{$c} : $null; print ',' if $c != 255; print "\n" if $c % 8 == 7; -- 2.2.2
Subject: Re: [rt.cpan.org #102024] remove extranous const casting
Date: Tue, 17 Feb 2015 21:43:24 +0900
To: bug-Unicode-Collate [...] rt.cpan.org
From: Sadahiro Tomoyuki <rsn10260 [...] nifty.com>
Download (untitled) / with headers
text/plain 825b
Thank you for your patch !! The next release with it will come soon. SADAHIRO Tomoyuki Show quoted text
> Mon Feb 09 14:00:30 2015: Request 102024 was acted upon. > Transaction: Ticket created by JHI > Queue: Unicode-Collate > Subject: remove extranous const casting > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: JHI@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=102024 > > > > Drop const casting of single string literals > > Should be unnecessary since the arrays are const char* const, > and makes at least IRIX cc whine mightily. Tested in a few > C and C++ compilers. Also verified by bulk88 not to undo > the constifications made for Win32 in rt.cpan.org #101170. > > Patch attached. >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.