Skip to content

Commit 0c56ca9

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 a285955 commit 0c56ca9

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
@@ -246,8 +246,8 @@ Returns the value slot (type C<SV*>)
246246
stored in the hash entry. Can be assigned
247247
to.
248248
249-
SV *foo= HeVAL(hv);
250-
HeVAL(hv)= sv;
249+
SV *foo= HeVAL(he);
250+
HeVAL(he)= sv;
251251
252252
253253
=for apidoc Am|U32|HeHASH|HE* he

0 commit comments

Comments
 (0)