summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-03-29 12:39:39 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-03-29 12:39:39 +0000
commit6c67d8430523d040fd14a0c05db6bcc2087b7ef5 (patch)
treea69b14ce28e454242ff7fe099eaaa1ce0266bbd2
parentb1ef3346531880eb22bd8e545ecf692d8ca8b66f (diff)
downloadperl-6c67d8430523d040fd14a0c05db6bcc2087b7ef5.tar.gz
Downconst external APIs
p4raw-id: //depot/perl@24095
-rw-r--r--embed.fnc10
-rw-r--r--gv.h2
-rw-r--r--op.c9
-rw-r--r--opcode.h8
-rwxr-xr-xopcode.pl8
-rw-r--r--pod/perlapi.pod2
-rw-r--r--proto.h10
-rw-r--r--sv.c8
-rw-r--r--util.c4
9 files changed, 30 insertions, 31 deletions
diff --git a/embed.fnc b/embed.fnc
index 0fe73ec1e0..f861478d86 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -143,8 +143,8 @@ Ap |void |cx_dump |PERL_CONTEXT* cs
Ap |SV* |filter_add |filter_t funcp|SV* datasv
Ap |void |filter_del |filter_t funcp
Ap |I32 |filter_read |int idx|SV* buffer|int maxlen
-Ap |const char** |get_op_descs
-Ap |const char** |get_op_names
+Ap |char** |get_op_descs
+Ap |char** |get_op_names
p |const char* |get_no_modify
p |U32* |get_opargs
Ap |PPADDR_t*|get_ppaddr
@@ -769,7 +769,7 @@ Apd |char* |sv_pvbyten_force|SV* sv|STRLEN* lp
Apd |char* |sv_recode_to_utf8 |SV* sv|SV *encoding
Apd |bool |sv_cat_decode |SV* dsv|SV *encoding|SV *ssv|int *offset \
|char* tstr|int tlen
-Apd |const char*|sv_reftype |const SV* sv|int ob
+Apd |char* |sv_reftype |const SV* sv|int ob
Apd |void |sv_replace |SV* sv|SV* nsv
Apd |void |sv_report_used
Apd |void |sv_reset |const char* s|HV* stash
@@ -951,8 +951,8 @@ Ap |void |sys_intern_clear
Ap |void |sys_intern_init
#endif
-Ap |const char *|custom_op_name |const OP* op
-Ap |const char *|custom_op_desc |const OP* op
+Ap |char * |custom_op_name |const OP* op
+Ap |char * |custom_op_desc |const OP* op
#if defined(PERL_COPY_ON_WRITE)
pMX |int |sv_release_IVX |SV *sv
diff --git a/gv.h b/gv.h
index 91fbd56b63..30a91147f2 100644
--- a/gv.h
+++ b/gv.h
@@ -20,7 +20,7 @@ struct gp {
U32 gp_cvgen; /* generational validity of cached gv_cv */
U32 gp_flags; /* XXX unused */
line_t gp_line; /* line first declared at (for -w) */
- const char * gp_file; /* file first declared in (for -w) */
+ char * gp_file; /* file first declared in (for -w) */
};
#define GvXPVGV(gv) ((XPVGV*)SvANY(gv))
diff --git a/op.c b/op.c
index 8107a84c7e..02d4f17c88 100644
--- a/op.c
+++ b/op.c
@@ -7018,9 +7018,8 @@ Perl_peep(pTHX_ register OP *o)
LEAVE;
}
-
-
-const char* Perl_custom_op_name(pTHX_ const OP* o)
+char*
+Perl_custom_op_name(pTHX_ const OP* o)
{
const IV index = PTR2IV(o->op_ppaddr);
SV* keysv;
@@ -7038,7 +7037,8 @@ const char* Perl_custom_op_name(pTHX_ const OP* o)
return SvPV_nolen(HeVAL(he));
}
-const char* Perl_custom_op_desc(pTHX_ const OP* o)
+char*
+Perl_custom_op_desc(pTHX_ const OP* o)
{
const IV index = PTR2IV(o->op_ppaddr);
SV* keysv;
@@ -7056,7 +7056,6 @@ const char* Perl_custom_op_desc(pTHX_ const OP* o)
return SvPV_nolen(HeVAL(he));
}
-
#include "XSUB.h"
/* Efficient sub that returns a constant scalar value. */
diff --git a/opcode.h b/opcode.h
index 85b78b674f..356145f540 100644
--- a/opcode.h
+++ b/opcode.h
@@ -27,9 +27,9 @@ START_EXTERN_C
PL_op_desc[(o)->op_type])
#ifndef DOINIT
-EXT const char *PL_op_name[];
+EXT char *PL_op_name[];
#else
-EXT const char *PL_op_name[] = {
+EXT char *PL_op_name[] = {
"null",
"stub",
"scalar",
@@ -388,9 +388,9 @@ EXT const char *PL_op_name[] = {
#endif
#ifndef DOINIT
-EXT const char *PL_op_desc[];
+EXT char *PL_op_desc[];
#else
-EXT const char *PL_op_desc[] = {
+EXT char *PL_op_desc[] = {
"null operation",
"stub",
"scalar",
diff --git a/opcode.pl b/opcode.pl
index 8305be99ef..d9c81b3c81 100755
--- a/opcode.pl
+++ b/opcode.pl
@@ -98,9 +98,9 @@ START_EXTERN_C
PL_op_desc[(o)->op_type])
#ifndef DOINIT
-EXT const char *PL_op_name[];
+EXT char *PL_op_name[];
#else
-EXT const char *PL_op_name[] = {
+EXT char *PL_op_name[] = {
END
for (@ops) {
@@ -115,9 +115,9 @@ END
print <<END;
#ifndef DOINIT
-EXT const char *PL_op_desc[];
+EXT char *PL_op_desc[];
#else
-EXT const char *PL_op_desc[] = {
+EXT char *PL_op_desc[] = {
END
for (@ops) {
diff --git a/pod/perlapi.pod b/pod/perlapi.pod
index 07319f27ac..2e7e59db46 100644
--- a/pod/perlapi.pod
+++ b/pod/perlapi.pod
@@ -4568,7 +4568,7 @@ Found in file sv.c
Returns a string describing what the SV is a reference to.
- const char* sv_reftype(const SV* sv, int ob)
+ char* sv_reftype(const SV* sv, int ob)
=for hackers
Found in file sv.c
diff --git a/proto.h b/proto.h
index 3ab47d8208..65fdc2bcfc 100644
--- a/proto.h
+++ b/proto.h
@@ -132,8 +132,8 @@ PERL_CALLCONV void Perl_cx_dump(pTHX_ PERL_CONTEXT* cs);
PERL_CALLCONV SV* Perl_filter_add(pTHX_ filter_t funcp, SV* datasv);
PERL_CALLCONV void Perl_filter_del(pTHX_ filter_t funcp);
PERL_CALLCONV I32 Perl_filter_read(pTHX_ int idx, SV* buffer, int maxlen);
-PERL_CALLCONV const char** Perl_get_op_descs(pTHX);
-PERL_CALLCONV const char** Perl_get_op_names(pTHX);
+PERL_CALLCONV char** Perl_get_op_descs(pTHX);
+PERL_CALLCONV char** Perl_get_op_names(pTHX);
PERL_CALLCONV const char* Perl_get_no_modify(pTHX);
PERL_CALLCONV U32* Perl_get_opargs(pTHX);
PERL_CALLCONV PPADDR_t* Perl_get_ppaddr(pTHX);
@@ -734,7 +734,7 @@ PERL_CALLCONV char* Perl_sv_pvutf8n_force(pTHX_ SV* sv, STRLEN* lp);
PERL_CALLCONV char* Perl_sv_pvbyten_force(pTHX_ SV* sv, STRLEN* lp);
PERL_CALLCONV char* Perl_sv_recode_to_utf8(pTHX_ SV* sv, SV *encoding);
PERL_CALLCONV bool Perl_sv_cat_decode(pTHX_ SV* dsv, SV *encoding, SV *ssv, int *offset, char* tstr, int tlen);
-PERL_CALLCONV const char* Perl_sv_reftype(pTHX_ const SV* sv, int ob);
+PERL_CALLCONV char* Perl_sv_reftype(pTHX_ const SV* sv, int ob);
PERL_CALLCONV void Perl_sv_replace(pTHX_ SV* sv, SV* nsv);
PERL_CALLCONV void Perl_sv_report_used(pTHX);
PERL_CALLCONV void Perl_sv_reset(pTHX_ const char* s, HV* stash);
@@ -911,8 +911,8 @@ PERL_CALLCONV void Perl_sys_intern_clear(pTHX);
PERL_CALLCONV void Perl_sys_intern_init(pTHX);
#endif
-PERL_CALLCONV const char * Perl_custom_op_name(pTHX_ const OP* op);
-PERL_CALLCONV const char * Perl_custom_op_desc(pTHX_ const OP* op);
+PERL_CALLCONV char * Perl_custom_op_name(pTHX_ const OP* op);
+PERL_CALLCONV char * Perl_custom_op_desc(pTHX_ const OP* op);
#if defined(PERL_COPY_ON_WRITE)
PERL_CALLCONV int Perl_sv_release_IVX(pTHX_ SV *sv);
diff --git a/sv.c b/sv.c
index 37edaf8b7c..51c9c74d68 100644
--- a/sv.c
+++ b/sv.c
@@ -8424,11 +8424,11 @@ Returns a string describing what the SV is a reference to.
=cut
*/
-const char *
+char *
Perl_sv_reftype(pTHX_ const SV *sv, int ob)
{
if (ob && SvOBJECT(sv)) {
- const char *name = HvNAME(SvSTASH(sv));
+ char *name = HvNAME(SvSTASH(sv));
return name ? name : "__ANON__";
}
else {
@@ -8442,13 +8442,13 @@ Perl_sv_reftype(pTHX_ const SV *sv, int ob)
case SVt_PVNV:
case SVt_PVMG:
case SVt_PVBM:
- if (SvVOK(sv))
+ if (SvVOK(sv))
return "VSTRING";
if (SvROK(sv))
return "REF";
else
return "SCALAR";
-
+
case SVt_PVLV: return SvROK(sv) ? "REF"
/* tied lvalues should appear to be
* scalars for backwards compatitbility */
diff --git a/util.c b/util.c
index b3cb7a6dea..ab39df9130 100644
--- a/util.c
+++ b/util.c
@@ -3008,13 +3008,13 @@ Perl_GetVars(pTHX)
}
#endif
-const char **
+char **
Perl_get_op_names(pTHX)
{
return PL_op_name;
}
-const char **
+char **
Perl_get_op_descs(pTHX)
{
return PL_op_desc;