In perl.git, the branch smueller/hash_vtable_make_hash has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d16c49165b773f4a6b3d7a0c4a0c2893a5301a78?hp=238d34d64798510221207797a8bce63565b01df9>
- Log ----------------------------------------------------------------- commit d16c49165b773f4a6b3d7a0c4a0c2893a5301a78 Author: Steffen Mueller <[email protected]> Date: Mon Jan 30 12:46:26 2017 +0100 Hash vtables: Extend Hash::Pluggable hobo-docs ----------------------------------------------------------------------- Summary of changes: ext/Hash-Pluggable/Pluggable.xs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/Hash-Pluggable/Pluggable.xs b/ext/Hash-Pluggable/Pluggable.xs index 77411e61b1..d88a90f1d3 100644 --- a/ext/Hash-Pluggable/Pluggable.xs +++ b/ext/Hash-Pluggable/Pluggable.xs @@ -24,6 +24,13 @@ * which contains "name" => vtable pointer mappings. * It should generally only be accessed directly from XS extensions * which implement vtables rather than from Perl code directly. + * For now, the API to add a new vtable implementation from an + * XS module is assuming you have a 'HV_VTBL *my_vtable': + * + * HV *vtable_reg = get_hv("Hash::Pluggable::VtableRegistry", GV_ADD); + * hv_stores(vtable_reg, "My::Module/set", my_vtable); + * + * in the BOOT section of your XS module. * * It seems like good practice to use vtable names of the form * "My::Module/fancy_vtable" -- Perl5 Master Repository
