Skip to content

Commit ec70236

Browse files
committed
perlapi - HeVAL operates on HEs, not HVs
The _perlapi_ example for `HeVAL` is misleading/confusing. Instead of: SV *foo= HeVAL(hv); HeVAL(hv)= sv; It should read: SV *foo= HeVAL(he); HeVAL(he)= sv; Rationale: `hv` is the variable name commonly given to a `HV*`, `he` is a logical name to give a `HE*`. `HeVAL` operates on the latter.
1 parent 2f150dc commit ec70236

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ Returns the value slot (type C<SV*>)
249249
stored in the hash entry. Can be assigned
250250
to.
251251
252-
SV *foo= HeVAL(hv);
253-
HeVAL(hv)= sv;
252+
SV *foo= HeVAL(he);
253+
HeVAL(he)= sv;
254254
255255
256256
=for apidoc Am|U32|HeHASH|HE* he

0 commit comments

Comments
 (0)