/* doop.c
*
- * Copyright (c) 1991-1994, Larry Wall
+ * Copyright (c) 1991-1997, Larry Wall
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
HV *hv = (HV*)POPs;
register HE *entry;
SV *tmpstr;
+ I32 gimme = GIMME_V;
I32 dokeys = (op->op_type == OP_KEYS);
I32 dovalues = (op->op_type == OP_VALUES);
(void)hv_iterinit(hv); /* always reset iterator regardless */
- if (GIMME != G_ARRAY) {
+ if (gimme == G_VOID)
+ RETURN;
+
+ if (gimme == G_SCALAR) {
I32 i;
dTARGET;
sv_setsv(tmpstr,hv_iterval(hv,entry));
SPAGAIN;
DEBUG_H( {
- sprintf(buf,"%d%%%d=%d\n", HeHASH(entry),
- HvMAX(hv)+1, HeHASH(entry) & HvMAX(hv));
+ sprintf(buf,"%lu%%%d=%lu\n",
+ (unsigned long)HeHASH(entry),
+ HvMAX(hv)+1,
+ (unsigned long)(HeHASH(entry) & HvMAX(hv)));
sv_setpv(tmpstr,buf);
} )
XPUSHs(sv_2mortal(tmpstr));