diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-01-23 14:44:59 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-01-23 14:44:59 +0000 |
commit | 92e67595817e2efa2a2f6c3e6498b1f1babb5fbd (patch) | |
tree | 76b73812aa48ecb7c930efd8074555c3ce07c6f3 | |
parent | c9869e1c0cac4f243c84d27552ad981d5363e0f7 (diff) | |
download | perl-92e67595817e2efa2a2f6c3e6498b1f1babb5fbd.tar.gz |
Un-const magic virtual tables; this consting breaks the nasty
things done by Swig, as noticed by Audrey.
p4raw-id: //depot/perl@26924
-rw-r--r-- | embed.fnc | 2 | ||||
-rw-r--r-- | mg.c | 2 | ||||
-rw-r--r-- | mg.h | 2 | ||||
-rw-r--r-- | perl.h | 8 | ||||
-rw-r--r-- | pod/perlapi.pod | 2 | ||||
-rw-r--r-- | proto.h | 2 | ||||
-rw-r--r-- | sv.c | 4 |
7 files changed, 11 insertions, 11 deletions
@@ -790,7 +790,7 @@ Apd |STRLEN |sv_len |NULLOK SV* sv Apd |STRLEN |sv_len_utf8 |NULLOK SV* sv Apd |void |sv_magic |NN SV* sv|NULLOK SV* obj|int how|NULLOK const char* name \ |I32 namlen -Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|NULLOK const MGVTBL *vtbl \ +Apd |MAGIC *|sv_magicext |NN SV* sv|NULLOK SV* obj|int how|NULLOK MGVTBL *vtbl \ |NULLOK const char* name|I32 namlen ApdaR |SV* |sv_mortalcopy |NULLOK SV* oldsv ApdR |SV* |sv_newmortal @@ -409,7 +409,7 @@ Perl_mg_localize(pTHX_ SV *sv, SV *nsv) dVAR; MAGIC *mg; for (mg = SvMAGIC(sv); mg; mg = mg->mg_moremagic) { - const MGVTBL* const vtbl = mg->mg_virtual; + MGVTBL* const vtbl = mg->mg_virtual; switch (mg->mg_type) { /* value magic types: don't copy */ case PERL_MAGIC_bm: @@ -26,7 +26,7 @@ struct mgvtbl { struct magic { MAGIC* mg_moremagic; - const MGVTBL* mg_virtual; /* pointer to magic functions */ + MGVTBL* mg_virtual; /* pointer to magic functions */ U16 mg_private; char mg_type; U8 mg_flags; @@ -4344,11 +4344,11 @@ END_EXTERN_C START_EXTERN_C #ifdef DOINIT -# define MGVTBL_SET(var,a,b,c,d,e,f,g) EXTCONST MGVTBL var = {a,b,c,d,e,f,g} -# define MGVTBL_SET_CONST_MAGIC_GET(var,a,b,c,d,e,f,g) EXTCONST MGVTBL var = {(int (*)(pTHX_ SV *, MAGIC *))a,b,c,d,e,f,g} /* Like MGVTBL_SET but with the get magic having a const MG* */ +# define MGVTBL_SET(var,a,b,c,d,e,f,g) EXT MGVTBL var = {a,b,c,d,e,f,g} +# define MGVTBL_SET_CONST_MAGIC_GET(var,a,b,c,d,e,f,g) EXT MGVTBL var = {(int (*)(pTHX_ SV *, MAGIC *))a,b,c,d,e,f,g} /* Like MGVTBL_SET but with the get magic having a const MG* */ #else -# define MGVTBL_SET(var,a,b,c,d,e,f,g) EXTCONST MGVTBL var -# define MGVTBL_SET_CONST_MAGIC_GET(var,a,b,c,d,e,f,g) EXTCONST MGVTBL var +# define MGVTBL_SET(var,a,b,c,d,e,f,g) EXT MGVTBL var +# define MGVTBL_SET_CONST_MAGIC_GET(var,a,b,c,d,e,f,g) EXT MGVTBL var #endif MGVTBL_SET( diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 933b2aa99e..5d807df536 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -5092,7 +5092,7 @@ to contain an C<SV*> and is stored as-is with its REFCNT incremented. (This is now used as a subroutine by C<sv_magic>.) - MAGIC * sv_magicext(SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen) + MAGIC * sv_magicext(SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen) =for hackers Found in file sv.c @@ -2190,7 +2190,7 @@ PERL_CALLCONV STRLEN Perl_sv_len_utf8(pTHX_ SV* sv); PERL_CALLCONV void Perl_sv_magic(pTHX_ SV* sv, SV* obj, int how, const char* name, I32 namlen) __attribute__nonnull__(pTHX_1); -PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtbl, const char* name, I32 namlen) +PERL_CALLCONV MAGIC * Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtbl, const char* name, I32 namlen) __attribute__nonnull__(pTHX_1); PERL_CALLCONV SV* Perl_sv_mortalcopy(pTHX_ SV* oldsv) @@ -4060,7 +4060,7 @@ to contain an C<SV*> and is stored as-is with its REFCNT incremented. =cut */ MAGIC * -Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, const MGVTBL *vtable, +Perl_sv_magicext(pTHX_ SV* sv, SV* obj, int how, MGVTBL *vtable, const char* name, I32 namlen) { dVAR; @@ -4149,7 +4149,7 @@ void Perl_sv_magic(pTHX_ register SV *sv, SV *obj, int how, const char *name, I32 namlen) { dVAR; - const MGVTBL *vtable; + MGVTBL *vtable; MAGIC* mg; #ifdef PERL_OLD_COPY_ON_WRITE |