diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2007-02-19 21:41:07 +0200 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-02-19 20:51:10 +0000 |
commit | bae1192d8838abbb774747207533573c1bc72f97 (patch) | |
tree | 3094225ad106e44d36de4623cef253bb1e02b4ee | |
parent | ed756621b7e346dcad5b51c1e9d060d1fe530fae (diff) | |
download | perl-bae1192d8838abbb774747207533573c1bc72f97.tar.gz |
blead (honestly :-) g++ with -DPERL_GLOBAL_STRUCT_PRIVATE needs tweaking
Message-Id: <20070219174107.63EEB43A67@anubis.hut.fi>
Plus a regen picked up changes in pod/perlapi.pod related to change
#30347.
p4raw-id: //depot/perl@30362
-rw-r--r-- | opcode.h | 3 | ||||
-rwxr-xr-x | opcode.pl | 3 | ||||
-rw-r--r-- | pod/perlapi.pod | 11 | ||||
-rw-r--r-- | sv.c | 4 | ||||
-rw-r--r-- | util.c | 27 |
5 files changed, 33 insertions, 15 deletions
@@ -1898,7 +1898,8 @@ EXTCONST U32 PL_opargs[] = { }; #endif +#endif /* !PERL_GLOBAL_STRUCT_INIT */ + END_EXTERN_C -#endif /* !PERL_GLOBAL_STRUCT_INIT */ /* ex: set ro: */ @@ -365,9 +365,10 @@ print <<END; }; #endif +#endif /* !PERL_GLOBAL_STRUCT_INIT */ + END_EXTERN_C -#endif /* !PERL_GLOBAL_STRUCT_INIT */ END if (keys %OP_IS_SOCKET) { diff --git a/pod/perlapi.pod b/pod/perlapi.pod index 4ebc353db1..00468b6be9 100644 --- a/pod/perlapi.pod +++ b/pod/perlapi.pod @@ -5065,6 +5065,17 @@ The reference count for the SV is set to 1. =for hackers Found in file sv.c +=item newSV_type +X<newSV_type> + +Creates a new SV, of the type specificied. The reference count for the new SV +is set to 1. + + SV* newSV_type(svtype type) + +=for hackers +Found in file sv.c + =item sv_2bool X<sv_2bool> @@ -11120,14 +11120,14 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, Newx(PL_my_cxt_list, PL_my_cxt_size, void *); Copy(proto_perl->Imy_cxt_list, PL_my_cxt_list, PL_my_cxt_size, void *); #ifdef PERL_GLOBAL_STRUCT_PRIVATE - Newx(PL_my_cxt_keys, PL_my_cxt_size, char *); + Newx(PL_my_cxt_keys, PL_my_cxt_size, const char *); Copy(proto_perl->Imy_cxt_keys, PL_my_cxt_keys, PL_my_cxt_size, char *); #endif } else { PL_my_cxt_list = (void**)NULL; #ifdef PERL_GLOBAL_STRUCT_PRIVATE - PL_my_cxt_keys = (void**)NULL; + PL_my_cxt_keys = (const char**)NULL; #endif } PL_modglobal = hv_dup_inc(proto_perl->Imodglobal, param); @@ -5158,13 +5158,14 @@ Perl_stashpv_hvname_match(pTHX_ const COP *c, const HV *hv) #ifdef PERL_GLOBAL_STRUCT +#define PERL_GLOBAL_STRUCT_INIT +#include "opcode.h" /* the ppaddr and check */ + struct perl_vars * Perl_init_global_struct(pTHX) { struct perl_vars *plvarsp = NULL; -#ifdef PERL_GLOBAL_STRUCT -# define PERL_GLOBAL_STRUCT_INIT -# include "opcode.h" /* the ppaddr and check */ +# ifdef PERL_GLOBAL_STRUCT const IV nppaddr = sizeof(Gppaddr)/sizeof(Perl_ppaddr_t); const IV ncheck = sizeof(Gcheck) /sizeof(Perl_check_t); # ifdef PERL_GLOBAL_STRUCT_PRIVATE @@ -5192,10 +5193,14 @@ Perl_init_global_struct(pTHX) # undef PERLVARIC # undef PERLVARISC # ifdef PERL_GLOBAL_STRUCT - plvarsp->Gppaddr = PerlMem_malloc(nppaddr * sizeof(Perl_ppaddr_t)); + plvarsp->Gppaddr = + (Perl_ppaddr_t*) + PerlMem_malloc(nppaddr * sizeof(Perl_ppaddr_t)); if (!plvarsp->Gppaddr) exit(1); - plvarsp->Gcheck = PerlMem_malloc(ncheck * sizeof(Perl_check_t)); + plvarsp->Gcheck = + (Perl_check_t*) + PerlMem_malloc(ncheck * sizeof(Perl_check_t)); if (!plvarsp->Gcheck) exit(1); Copy(Gppaddr, plvarsp->Gppaddr, nppaddr, Perl_ppaddr_t); @@ -5204,8 +5209,8 @@ Perl_init_global_struct(pTHX) # ifdef PERL_SET_VARS PERL_SET_VARS(plvarsp); # endif -# undef PERL_GLOBAL_STRUCT_INIT -#endif +# undef PERL_GLOBAL_STRUCT_INIT +# endif return plvarsp; } @@ -5216,16 +5221,16 @@ Perl_init_global_struct(pTHX) void Perl_free_global_struct(pTHX_ struct perl_vars *plvarsp) { -#ifdef PERL_GLOBAL_STRUCT +# ifdef PERL_GLOBAL_STRUCT # ifdef PERL_UNSET_VARS PERL_UNSET_VARS(plvarsp); # endif free(plvarsp->Gppaddr); free(plvarsp->Gcheck); -# ifdef PERL_GLOBAL_STRUCT_PRIVATE +# ifdef PERL_GLOBAL_STRUCT_PRIVATE free(plvarsp); -# endif -#endif +# endif +# endif } #endif /* PERL_GLOBAL_STRUCT */ |