Mailing List Archive

STRLEN vs U32 prototype inconsistency
Consider

SV** hv_fetch _((HV* tb, char* key, U32 klen, I32 lval));
and
char* sv_2pv _((SV* sv, STRLEN* lp));

This makes code like

char *key = SvPV(sv, klen);
SV **svp = hv_fetch(hv, key, klen, 0);

give type warnings at one line or the other if klen is either STRLEN or U32.
(Assuming STRLEN and U32 are different types, which they are on SunOS 4.)

Looking at proto.h it seems that the hv_*() functions are out of step
in using U32 instead of STRLEN.

Tim.