diff options
author | Yves Orton <demerphq@gmail.com> | 2014-12-25 01:33:42 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2014-12-25 01:34:39 +0100 |
commit | eaab56493bda8d2c9e499f01433ea2da9b29f6e5 (patch) | |
tree | f52f9654540bc436cf4482d0dfe54e65410158bc /embed.fnc | |
parent | cced55d2e366f8ccb0884e747f32c32c1b538989 (diff) | |
download | perl-eaab56493bda8d2c9e499f01433ea2da9b29f6e5.tar.gz |
add new API function sv_get_backrefs()
This encapsulates the logic to extract the backrefs from a weak-referent.
Since sv_get_backrefs() can be used for a similar purposes as hv_backreferences_p()
we no longer need to export the later, and therefore this patch also reverts
ad2f46a793b4ade67d45ac0086ae62f6756c2752.
See perl #123473 for related discussion, and https://github.com/Sereal/Sereal/issues/73
for a practical example of why this API is required.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1786,6 +1786,7 @@ Apdmb |void |sv_force_normal|NN SV *sv Apd |void |sv_force_normal_flags|NN SV *const sv|const U32 flags pX |SSize_t|tmps_grow_p |SSize_t ix Apd |SV* |sv_rvweaken |NN SV *const sv +ApPMd |SV* |sv_get_backrefs|NN SV *const sv : This is indirectly referenced by globals.c. This is somewhat annoying. p |int |magic_killbackrefs|NN SV *sv|NN MAGIC *mg Ap |OP* |newANONATTRSUB |I32 floor|NULLOK OP *proto|NULLOK OP *attrs|NULLOK OP *block @@ -2640,7 +2641,7 @@ p |void |hv_ename_add |NN HV *hv|NN const char *name|U32 len \ p |void |hv_ename_delete|NN HV *hv|NN const char *name|U32 len \ |U32 flags : Used in dump.c and hv.c -ApoM |AV** |hv_backreferences_p |NN HV *hv +poM |AV** |hv_backreferences_p |NN HV *hv #if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_SCOPE_C) poM |void |hv_kill_backrefs |NN HV *hv #endif |