For PROXYSUBS, tables may sometimes have no entries.
authorJan Dubois <jand@activestate.com>
Mon, 25 Oct 2010 17:23:04 +0000 (10:23 -0700)
committerJan Dubois <jand@activestate.com>
Mon, 25 Oct 2010 17:23:51 +0000 (10:23 -0700)
The reason being that all entries in the tables are guarded
with #ifdef, so if none of the symbols are defined, then we
still end up with an empty table.  This actually happens in
the POSIX module on Windows for the "yes" table.

This reverts commit c553cca0 and changes based on it.

cpan/ExtUtils-Constant/lib/ExtUtils/Constant/ProxySubs.pm

index 0c04002..545d322 100644 (file)
@@ -135,18 +135,20 @@ sub boottime_iterator {
 
     if ($push) {
        return sprintf <<"EOBOOT", &$generator(&$extractor($iterator));
-        do {
+        while ($iterator->name) {
            he = $subname($athx $hash, $iterator->name,
                                     $iterator->namelen, %s);
            av_push(push, newSVhek(HeKEY_hek(he)));
-       } while ((++$iterator)->name);
+            ++$iterator;
+       }
 EOBOOT
     } else {
        return sprintf <<"EOBOOT", &$generator(&$extractor($iterator));
-        do {
+        while ($iterator->name) {
            $subname($athx $hash, $iterator->name,
                                $iterator->namelen, %s);
-       } while ((++$iterator)->name);
+            ++$iterator;
+       }
 EOBOOT
     }
 }