Author: chromatic
Date: Sun Jun  3 10:25:46 2007
New Revision: 18785

Modified:
   trunk/compilers/pge/PGE/pmc/codestring.pmc
   trunk/include/parrot/dod.h
   trunk/languages/APL/src/pmc/aplvector.pmc

Log:
Change comparisons against PMCNULL to use the PMC_IS_NULL() macro (RT #42508).

Modified: trunk/compilers/pge/PGE/pmc/codestring.pmc
==============================================================================
--- trunk/compilers/pge/PGE/pmc/codestring.pmc  (original)
+++ trunk/compilers/pge/PGE/pmc/codestring.pmc  Sun Jun  3 10:25:46 2007
@@ -119,7 +119,7 @@
         {
             key = string_substr(interp, format, position + 1, 1, NULL, 0);
             /* named substitution  %position */
-            if ( named_args != PMCNULL && VTABLE_exists_keyed_str(interp, 
named_args, key)) {
+            if ( !PMC_IS_NULL(named_args) && VTABLE_exists_keyed_str(interp, 
named_args, key)) {
                 repl = VTABLE_get_string_keyed_str(interp, named_args, key);
             }
             /* positional substutution  %7 */

Modified: trunk/include/parrot/dod.h
==============================================================================
--- trunk/include/parrot/dod.h  (original)
+++ trunk/include/parrot/dod.h  Sun Jun  3 10:25:46 2007
@@ -129,7 +129,7 @@
 #if PARROT_GC_GMS
 #  define DOD_WRITE_BARRIER(interp, agg, old, new) do { \
     UINTVAL gen_agg, gen_new; \
-    if (!(new) || (new) == (void*)PMCNULL) \
+    if (!(new) || PMC_IS_NULL(new)) \
         break; \
     gen_agg = PObj_to_GMSH(agg)->gen->gen_no; \
     gen_new = PObj_to_GMSH(new)->gen->gen_no; \
@@ -139,7 +139,7 @@
 
 #  define DOD_WRITE_BARRIER_KEY(interp, agg, old, old_key, new, new_key) do { \
     UINTVAL gen_agg, gen_new, gen_key; \
-    if (!(new) || (new) == (void*)PMCNULL) \
+    if (!(new) || PMC_IS_NULL(new)) \
         break; \
     gen_agg = PObj_to_GMSH(agg)->gen->gen_no; \
     gen_new = PObj_to_GMSH(new)->gen->gen_no; \

Modified: trunk/languages/APL/src/pmc/aplvector.pmc
==============================================================================
--- trunk/languages/APL/src/pmc/aplvector.pmc   (original)
+++ trunk/languages/APL/src/pmc/aplvector.pmc   Sun Jun  3 10:25:46 2007
@@ -31,7 +31,7 @@
     INTVAL length;
     INTVAL pos;
 
-    if (!shape || shape == PMCNULL) {
+    if (!shape || PMC_IS_NULL(shape)) {
         /* not set, so a simple 1D */
         return VTABLE_get_integer(interpreter, self);
     }
@@ -116,7 +116,7 @@
 
         property_name = string_from_cstring(INTERP,"shape",0);
         shape = VTABLE_getprop(INTERP, SELF, property_name);
-        if (shape == PMCNULL) {
+        if (PMC_IS_NULL(shape)) {
            /*
             * No shape has been set yet. This means that we are
             * a simple vector

Reply via email to