simplify idiot PUSHs/SPAGAIN incest
Yuval Kogman [Mon, 11 Aug 2008 00:35:12 +0000 (00:35 +0000)]
MOP.xs

diff --git a/MOP.xs b/MOP.xs
index b7dfd03..f9f5d9b 100644 (file)
--- a/MOP.xs
+++ b/MOP.xs
@@ -136,14 +136,10 @@ get_all_package_symbols(package, ...)
                 EXTEND(SP, HvKEYS(stash) * 2);
 
                 while ((entry = hv_iternext(stash))) {
-                    SV *sv;
-                    SPAGAIN;
-                    sv = hv_iterkeysv(entry);
-                    SPAGAIN;
-                    PUSHs(sv);
-                    PUTBACK;
-                    sv = hv_iterval(stash, entry);
+                    SV *key = hv_iterkeysv(entry);
+                    SV *sv = hv_iterval(stash, entry);
                     SPAGAIN;
+                    PUSHs(key);
                     PUSHs(sv);
                     PUTBACK;
                 }