From: Yitzchak Scott-Thoennes Date: Thu, 12 Jan 2006 01:41:18 +0000 (-0800) Subject: Re: cloning and foo_dup functions X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c047da72dad550fab936255d6cbaaeab43399d2;p=p5sagit%2Fp5-mst-13.2.git Re: cloning and foo_dup functions Message-ID: <20060112094118.GA1432@efn.org> p4raw-id: //depot/perl@26799 --- diff --git a/embed.fnc b/embed.fnc index 737fc09..2f0a8fd 100644 --- a/embed.fnc +++ b/embed.fnc @@ -975,21 +975,21 @@ Apr |void |newMYSUB |I32 floor|NULLOK OP *o|NULLOK OP *proto|NULLOK OP *attrs|NU p |OP * |my_attrs |NN OP *o|NULLOK OP *attrs p |void |boot_core_xsutils #if defined(USE_ITHREADS) -Apa |PERL_CONTEXT*|cx_dup |NULLOK PERL_CONTEXT* cx|I32 ix|I32 max|NN CLONE_PARAMS* param -Apa |PERL_SI*|si_dup |NULLOK PERL_SI* si|NN CLONE_PARAMS* param +ApR |PERL_CONTEXT*|cx_dup |NULLOK PERL_CONTEXT* cx|I32 ix|I32 max|NN CLONE_PARAMS* param +ApR |PERL_SI*|si_dup |NULLOK PERL_SI* si|NN CLONE_PARAMS* param Apa |ANY* |ss_dup |NN PerlInterpreter* proto_perl|NN CLONE_PARAMS* param -Apa |void* |any_dup |NULLOK void* v|NN const PerlInterpreter* proto_perl -Apa |HE* |he_dup |NULLOK const HE* e|bool shared|NN CLONE_PARAMS* param -Apa |HEK* |hek_dup |NULLOK HEK* e|NN CLONE_PARAMS* param -Apa |REGEXP*|re_dup |NULLOK const REGEXP* r|NN CLONE_PARAMS* param -Apa |PerlIO*|fp_dup |NULLOK PerlIO* fp|char type|NN CLONE_PARAMS* param -Apa |DIR* |dirp_dup |NULLOK DIR* dp -Apa |GP* |gp_dup |NULLOK GP* gp|NN CLONE_PARAMS* param -Apa |MAGIC* |mg_dup |NULLOK MAGIC* mg|NN CLONE_PARAMS* param -Apa |SV* |sv_dup |NULLOK const SV* sstr|NN CLONE_PARAMS* param +ApR |void* |any_dup |NULLOK void* v|NN const PerlInterpreter* proto_perl +ApR |HE* |he_dup |NULLOK const HE* e|bool shared|NN CLONE_PARAMS* param +ApR |HEK* |hek_dup |NULLOK HEK* e|NN CLONE_PARAMS* param +ApR |REGEXP*|re_dup |NULLOK const REGEXP* r|NN CLONE_PARAMS* param +Ap |PerlIO*|fp_dup |NULLOK PerlIO* fp|char type|NN CLONE_PARAMS* param +ApR |DIR* |dirp_dup |NULLOK DIR* dp +ApR |GP* |gp_dup |NULLOK GP* gp|NN CLONE_PARAMS* param +ApR |MAGIC* |mg_dup |NULLOK MAGIC* mg|NN CLONE_PARAMS* param +ApR |SV* |sv_dup |NULLOK const SV* sstr|NN CLONE_PARAMS* param Ap |void |rvpv_dup |NN SV* dstr|NN const SV *sstr|NN CLONE_PARAMS* param Apa |PTR_TBL_t*|ptr_table_new -Apa |void* |ptr_table_fetch|NN PTR_TBL_t *tbl|NN const void *sv +ApR |void* |ptr_table_fetch|NN PTR_TBL_t *tbl|NN const void *sv Ap |void |ptr_table_store|NN PTR_TBL_t *tbl|NULLOK const void *oldsv|NN void *newsv Ap |void |ptr_table_split|NN PTR_TBL_t *tbl Ap |void |ptr_table_clear|NULLOK PTR_TBL_t *tbl diff --git a/pod/perltodo.pod b/pod/perltodo.pod index a8a6d79..19d12dd 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -651,6 +651,8 @@ Generally make ithreads more robust. See also L This task is incremental - even a little bit of work on it will help, and will be greatly appreciated. +One bit would be to write the missing code in sv.c:Perl_dirp_dup. + =head2 iCOW Sarathy and Arthur have a proposal for an improved Copy On Write which diff --git a/proto.h b/proto.h index 2a7c6d8..2ec9550 100644 --- a/proto.h +++ b/proto.h @@ -2711,12 +2711,10 @@ PERL_CALLCONV OP * Perl_my_attrs(pTHX_ OP *o, OP *attrs) PERL_CALLCONV void Perl_boot_core_xsutils(pTHX); #if defined(USE_ITHREADS) PERL_CALLCONV PERL_CONTEXT* Perl_cx_dup(pTHX_ PERL_CONTEXT* cx, I32 ix, I32 max, CLONE_PARAMS* param) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_4); PERL_CALLCONV PERL_SI* Perl_si_dup(pTHX_ PERL_SI* si, CLONE_PARAMS* param) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); @@ -2727,46 +2725,36 @@ PERL_CALLCONV ANY* Perl_ss_dup(pTHX_ PerlInterpreter* proto_perl, CLONE_PARAMS* __attribute__nonnull__(pTHX_2); PERL_CALLCONV void* Perl_any_dup(pTHX_ void* v, const PerlInterpreter* proto_perl) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); PERL_CALLCONV HE* Perl_he_dup(pTHX_ const HE* e, bool shared, CLONE_PARAMS* param) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3); PERL_CALLCONV HEK* Perl_hek_dup(pTHX_ HEK* e, CLONE_PARAMS* param) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); PERL_CALLCONV REGEXP* Perl_re_dup(pTHX_ const REGEXP* r, CLONE_PARAMS* param) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); PERL_CALLCONV PerlIO* Perl_fp_dup(pTHX_ PerlIO* fp, char type, CLONE_PARAMS* param) - __attribute__malloc__ - __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_3); PERL_CALLCONV DIR* Perl_dirp_dup(pTHX_ DIR* dp) - __attribute__malloc__ __attribute__warn_unused_result__; PERL_CALLCONV GP* Perl_gp_dup(pTHX_ GP* gp, CLONE_PARAMS* param) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); PERL_CALLCONV MAGIC* Perl_mg_dup(pTHX_ MAGIC* mg, CLONE_PARAMS* param) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); PERL_CALLCONV SV* Perl_sv_dup(pTHX_ const SV* sstr, CLONE_PARAMS* param) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_2); @@ -2780,7 +2768,6 @@ PERL_CALLCONV PTR_TBL_t* Perl_ptr_table_new(pTHX) __attribute__warn_unused_result__; PERL_CALLCONV void* Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *tbl, const void *sv) - __attribute__malloc__ __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2);