develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34340 - trunk/languages/perl6/src/pmc

From:
chromatic
Date:
December 24, 2008 13:38
Subject:
[svn:parrot] r34340 - trunk/languages/perl6/src/pmc
Message ID:
20081224213801.077BACBA12@x12.develooper.com
Author: chromatic
Date: Wed Dec 24 13:37:58 2008
New Revision: 34340

Modified:
   trunk/languages/perl6/src/pmc/perl6multisub.pmc

Log:
[Rakudo] Fixed some compilation warnings in MultiSub PMC.

Modified: trunk/languages/perl6/src/pmc/perl6multisub.pmc
==============================================================================
--- trunk/languages/perl6/src/pmc/perl6multisub.pmc	(original)
+++ trunk/languages/perl6/src/pmc/perl6multisub.pmc	Wed Dec 24 13:37:58 2008
@@ -448,7 +448,7 @@
 
     /* Iterate over the candidates and collect best ones; terminate
      * when we see two nulls (may break out earlier). */
-    while (cur_candidate[0] != NULL || cur_candidate[1] != NULL) {
+    while (cur_candidate[0] || cur_candidate[1]) {
         if (*cur_candidate == NULL) {
             /* If we're after just one candidate and we have found some, then
              * we've hit the end of a tied group now, so stop looking if we are
@@ -502,8 +502,8 @@
      * dispatch. Note that we could also store the current candidate set and
      * re-enter the dispatch algorithm below, making it cheaper to get to that
      * point. */
-    if (possibles_count == 1 && cache != NULL)
-        Parrot_mmd_cache_store_by_values(interp, cache, NULL, args, possibles[0]->sub);
+    if (possibles_count == 1 && cache)
+        Parrot_mmd_cache_store_by_values(interp, cache, "", args, possibles[0]->sub);
 
     /* If we have multiple candidates left, tie-break on any constraints. */
     if (possibles_count > 1) {
@@ -740,7 +740,7 @@
         GETATTR_Perl6MultiSub_candidates_sorted(interp, SELF, candidates);
         if (candidates) {
             candidate_info **cur_candidate = candidates;
-            while (cur_candidate[0] != NULL || cur_candidate[1] != NULL) {
+            while (cur_candidate[0] || cur_candidate[1]) {
                 if (*cur_candidate)
                     mem_sys_free(*cur_candidate);
                 cur_candidate++;
@@ -793,7 +793,7 @@
 
         /* See if we have a cache entry. */
         GETATTR_Perl6MultiSub_cache(interp, SELF, cache);
-        found = Parrot_mmd_cache_lookup_by_values(interp, cache, NULL, args);
+        found = Parrot_mmd_cache_lookup_by_values(interp, cache, "", args);
         if (PMC_IS_NULL(found)) {
             PMC *proto;
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About