Fix MM doc's use of "SUPER::"
[p5sagit/p5-mst-13.2.git] / doop.c
diff --git a/doop.c b/doop.c
index f16ec64..400934d 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -1,6 +1,6 @@
 /*    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.
@@ -649,6 +649,7 @@ dARGS
     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);
 
@@ -667,7 +668,10 @@ dARGS
 
     (void)hv_iterinit(hv);     /* always reset iterator regardless */
 
-    if (GIMME != G_ARRAY) {
+    if (gimme == G_VOID)
+       RETURN;
+
+    if (gimme == G_SCALAR) {
        I32 i;
        dTARGET;
 
@@ -709,8 +713,10 @@ dARGS
            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));