From: Rafael Garcia-Suarez Date: Tue, 29 Mar 2005 12:39:39 +0000 (+0000) Subject: Downconst external APIs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1cb0ed9b77e4ba2e0bcbeb9a897574a0fe3f3e52;p=p5sagit%2Fp5-mst-13.2.git Downconst external APIs p4raw-id: //depot/perl@24095 --- diff --git a/embed.fnc b/embed.fnc index 0fe73ec..f861478 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 91fbd56..30a9114 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 8107a84..02d4f17 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 85b78b6..356145f 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 8305be9..d9c81b3 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 <