in reply to XS: The equivalent of perl's ...
From mg.c, the following is the code called after the the value is assigned to the scalar returned by keys %h, sv being that scalar, and MUTABLE_HV(LvTARG(sv)) being the hash:
Perl_magic_setnkeys(pTHX_ SV *sv, MAGIC *mg) { PERL_ARGS_ASSERT_MAGIC_SETNKEYS; PERL_UNUSED_ARG(mg); if (LvTARG(sv)) { hv_ksplit(MUTABLE_HV(LvTARG(sv)), SvIV(sv)); } return 0; }
|
|---|