Change 33448 by [EMAIL PROTECTED] on 2008/03/06 13:29:56
Silence some warnings on Win32 with VC6
VC7 onwards didn't seem to mind (perhaps thanks to #33411):
http://www.nntp.perl.org/group/perl.daily-build.reports/2008/03/msg54118.html
but VC6 wasn't happy:
http://www.nntp.perl.org/group/perl.daily-build.reports/2008/03/msg54099.html
Affected files ...
... //depot/perl/embed.fnc#597 edit
... //depot/perl/perl.h#834 edit
... //depot/perl/pp_sort.c#78 edit
... //depot/perl/proto.h#932 edit
Differences ...
==== //depot/perl/embed.fnc#597 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#596~33411~ 2008-03-02 11:46:27.000000000 -0800
+++ perl/embed.fnc 2008-03-06 05:29:56.000000000 -0800
@@ -1379,15 +1379,15 @@
#endif
#if defined(PERL_IN_PP_SORT_C) || defined(PERL_DECL_PROT)
-s |I32 |sv_ncmp |NN SV *a|NN SV *b
-s |I32 |sv_i_ncmp |NN SV *a|NN SV *b
-s |I32 |amagic_ncmp |NN SV *a|NN SV *b
-s |I32 |amagic_i_ncmp |NN SV *a|NN SV *b
-s |I32 |amagic_cmp |NN SV *str1|NN SV *str2
-s |I32 |amagic_cmp_locale|NN SV *str1|NN SV *str2
-s |I32 |sortcv |NN SV *a|NN SV *b
-s |I32 |sortcv_xsub |NN SV *a|NN SV *b
-s |I32 |sortcv_stacked |NN SV *a|NN SV *b
+s |I32 |sv_ncmp |NN SV *const a|NN SV *const b
+s |I32 |sv_i_ncmp |NN SV *const a|NN SV *const b
+s |I32 |amagic_ncmp |NN SV *const a|NN SV *const b
+s |I32 |amagic_i_ncmp |NN SV *const a|NN SV *const b
+s |I32 |amagic_cmp |NN SV *const str1|NN SV *const str2
+s |I32 |amagic_cmp_locale|NN SV *const str1|NN SV *const str2
+s |I32 |sortcv |NN SV *const a|NN SV *const b
+s |I32 |sortcv_xsub |NN SV *const a|NN SV *const b
+s |I32 |sortcv_stacked |NN SV *const a|NN SV *const b
s |void |qsortsvu |NULLOK SV** array|size_t num_elts|NN
SVCOMPARE_t compare
#endif
==== //depot/perl/perl.h#834 (text) ====
Index: perl/perl.h
--- perl/perl.h#833~33390~ 2008-02-27 11:11:12.000000000 -0800
+++ perl/perl.h 2008-03-06 05:29:56.000000000 -0800
@@ -4649,7 +4649,7 @@
typedef void (*DESTRUCTORFUNC_NOCONTEXT_t) (void*);
typedef void (*DESTRUCTORFUNC_t) (pTHX_ void*);
typedef void (*SVFUNC_t) (pTHX_ SV* const);
-typedef I32 (*SVCOMPARE_t) (pTHX_ SV*, SV*);
+typedef I32 (*SVCOMPARE_t) (pTHX_ SV* const, SV* const);
typedef void (*XSINIT_t) (pTHX);
typedef void (*ATEXIT_t) (pTHX_ void*);
typedef void (*XSUBADDR_t) (pTHX_ CV *);
==== //depot/perl/pp_sort.c#78 (text) ====
Index: perl/pp_sort.c
--- perl/pp_sort.c#77~33291~ 2008-02-12 05:15:20.000000000 -0800
+++ perl/pp_sort.c 2008-03-06 05:29:56.000000000 -0800
@@ -340,7 +340,7 @@
static I32
-cmp_desc(pTHX_ gptr a, gptr b)
+cmp_desc(pTHX_ gptr const a, gptr const b)
{
dVAR;
return -PL_sort_RealCmp(aTHX_ a, b);
@@ -1315,7 +1315,7 @@
static I32
-cmpindir(pTHX_ gptr a, gptr b)
+cmpindir(pTHX_ gptr const a, gptr const b)
{
dVAR;
gptr * const ap = (gptr *)a;
@@ -1328,7 +1328,7 @@
}
static I32
-cmpindir_desc(pTHX_ gptr a, gptr b)
+cmpindir_desc(pTHX_ gptr const a, gptr const b)
{
dVAR;
gptr * const ap = (gptr *)a;
@@ -1738,7 +1738,7 @@
}
static I32
-S_sortcv(pTHX_ SV *a, SV *b)
+S_sortcv(pTHX_ SV *const a, SV *const b)
{
dVAR;
const I32 oldsaveix = PL_savestack_ix;
@@ -1765,7 +1765,7 @@
}
static I32
-S_sortcv_stacked(pTHX_ SV *a, SV *b)
+S_sortcv_stacked(pTHX_ SV *const a, SV *const b)
{
dVAR;
const I32 oldsaveix = PL_savestack_ix;
@@ -1807,7 +1807,7 @@
}
static I32
-S_sortcv_xsub(pTHX_ SV *a, SV *b)
+S_sortcv_xsub(pTHX_ SV *const a, SV *const b)
{
dVAR; dSP;
const I32 oldsaveix = PL_savestack_ix;
@@ -1838,7 +1838,7 @@
static I32
-S_sv_ncmp(pTHX_ SV *a, SV *b)
+S_sv_ncmp(pTHX_ SV *const a, SV *const b)
{
const NV nv1 = SvNSIV(a);
const NV nv2 = SvNSIV(b);
@@ -1849,7 +1849,7 @@
}
static I32
-S_sv_i_ncmp(pTHX_ SV *a, SV *b)
+S_sv_i_ncmp(pTHX_ SV *const a, SV *const b)
{
const IV iv1 = SvIV(a);
const IV iv2 = SvIV(b);
@@ -1867,7 +1867,7 @@
#define SORT_NORMAL_RETURN_VALUE(val) (((val) > 0) ? 1 : ((val) ? -1 : 0))
static I32
-S_amagic_ncmp(pTHX_ register SV *a, register SV *b)
+S_amagic_ncmp(pTHX_ register SV *const a, register SV *const b)
{
dVAR;
SV * const tmpsv = tryCALL_AMAGICbin(a,b,ncmp);
@@ -1888,7 +1888,7 @@
}
static I32
-S_amagic_i_ncmp(pTHX_ register SV *a, register SV *b)
+S_amagic_i_ncmp(pTHX_ register SV *const a, register SV *const b)
{
dVAR;
SV * const tmpsv = tryCALL_AMAGICbin(a,b,ncmp);
@@ -1909,7 +1909,7 @@
}
static I32
-S_amagic_cmp(pTHX_ register SV *str1, register SV *str2)
+S_amagic_cmp(pTHX_ register SV *const str1, register SV *const str2)
{
dVAR;
SV * const tmpsv = tryCALL_AMAGICbin(str1,str2,scmp);
@@ -1930,7 +1930,7 @@
}
static I32
-S_amagic_cmp_locale(pTHX_ register SV *str1, register SV *str2)
+S_amagic_cmp_locale(pTHX_ register SV *const str1, register SV *const str2)
{
dVAR;
SV * const tmpsv = tryCALL_AMAGICbin(str1,str2,scmp);
==== //depot/perl/proto.h#932 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#931~33411~ 2008-03-02 11:46:27.000000000 -0800
+++ perl/proto.h 2008-03-06 05:29:56.000000000 -0800
@@ -5011,55 +5011,55 @@
#endif
#if defined(PERL_IN_PP_SORT_C) || defined(PERL_DECL_PROT)
-STATIC I32 S_sv_ncmp(pTHX_ SV *a, SV *b)
+STATIC I32 S_sv_ncmp(pTHX_ SV *const a, SV *const b)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_SV_NCMP \
assert(a); assert(b)
-STATIC I32 S_sv_i_ncmp(pTHX_ SV *a, SV *b)
+STATIC I32 S_sv_i_ncmp(pTHX_ SV *const a, SV *const b)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_SV_I_NCMP \
assert(a); assert(b)
-STATIC I32 S_amagic_ncmp(pTHX_ SV *a, SV *b)
+STATIC I32 S_amagic_ncmp(pTHX_ SV *const a, SV *const b)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_AMAGIC_NCMP \
assert(a); assert(b)
-STATIC I32 S_amagic_i_ncmp(pTHX_ SV *a, SV *b)
+STATIC I32 S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_AMAGIC_I_NCMP \
assert(a); assert(b)
-STATIC I32 S_amagic_cmp(pTHX_ SV *str1, SV *str2)
+STATIC I32 S_amagic_cmp(pTHX_ SV *const str1, SV *const str2)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_AMAGIC_CMP \
assert(str1); assert(str2)
-STATIC I32 S_amagic_cmp_locale(pTHX_ SV *str1, SV *str2)
+STATIC I32 S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE \
assert(str1); assert(str2)
-STATIC I32 S_sortcv(pTHX_ SV *a, SV *b)
+STATIC I32 S_sortcv(pTHX_ SV *const a, SV *const b)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_SORTCV \
assert(a); assert(b)
-STATIC I32 S_sortcv_xsub(pTHX_ SV *a, SV *b)
+STATIC I32 S_sortcv_xsub(pTHX_ SV *const a, SV *const b)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_SORTCV_XSUB \
assert(a); assert(b)
-STATIC I32 S_sortcv_stacked(pTHX_ SV *a, SV *b)
+STATIC I32 S_sortcv_stacked(pTHX_ SV *const a, SV *const b)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2);
#define PERL_ARGS_ASSERT_SORTCV_STACKED \
End of Patch.