Author: smash
Date: Fri Apr 27 04:30:50 2007
New Revision: 18344

Modified:
   trunk/src/io/io.c
   trunk/src/pmc/namespace.pmc
   trunk/src/pmc/resizablepmcarray.pmc
   trunk/src/trace.c
   trunk/tools/build/nativecall.pl

Log:
* changed a few tests to check for null PMCs to use macro PMC_IS_NULL
as described in RT#42508 (changed the one applied in patch regarding 
RT#41894)


Modified: trunk/src/io/io.c
==============================================================================
--- trunk/src/io/io.c   (original)
+++ trunk/src/io/io.c   Fri Apr 27 04:30:50 2007
@@ -1328,7 +1328,7 @@
     ParrotIOLayer *l;
     ParrotIO *io;
 
-    if (pmc == PMCNULL) {
+    if ( PMC_IS_NULL(pmc) ) {
         real_exception(interp, NULL, E_ValueError, "Can't poll NULL pmc");
     }
 

Modified: trunk/src/pmc/namespace.pmc
==============================================================================
--- trunk/src/pmc/namespace.pmc (original)
+++ trunk/src/pmc/namespace.pmc Fri Apr 27 04:30:50 2007
@@ -503,7 +503,7 @@
         PMC    *ns   = parrot_hash_get(INTERP, hash, name);
         STRING *s_ns = CONST_STRING(INTERP, "NameSpace");
 
-        if (ns == PMCNULL)
+        if ( PMC_IS_NULL(ns) )
             return;
 
         if (!VTABLE_isa(INTERP, ns, s_ns)) {
@@ -536,7 +536,7 @@
         PMC    *sub   = parrot_hash_get(INTERP, hash, name);
         STRING *s_sub = CONST_STRING(INTERP, "Sub");
 
-        if (sub == PMCNULL)
+        if ( PMC_IS_NULL(sub) )
             return;
 
         if (!VTABLE_isa(INTERP, sub, s_sub)) {

Modified: trunk/src/pmc/resizablepmcarray.pmc
==============================================================================
--- trunk/src/pmc/resizablepmcarray.pmc (original)
+++ trunk/src/pmc/resizablepmcarray.pmc Fri Apr 27 04:30:50 2007
@@ -205,7 +205,7 @@
         if (key >= PMC_int_val(SELF))
             DYNSELF.set_integer_native(key+1);
         data = PMC_data(SELF);
-        if (data[key] == PMCNULL)
+        if ( PMC_IS_NULL(data[key]) )
             data[key] = pmc_new(INTERP, enum_class_Undef);
         return data[key];
     }

Modified: trunk/src/trace.c
==============================================================================
--- trunk/src/trace.c   (original)
+++ trunk/src/trace.c   Fri Apr 27 04:30:50 2007
@@ -61,7 +61,7 @@
         PIO_eprintf(debugger, "(null)");
         return;
     }
-    if (pmc == PMCNULL)  {
+    if ( PMC_IS_NULL(pmc) )  {
         PIO_eprintf(debugger, "PMCNULL");
         return;
     }

Modified: trunk/tools/build/nativecall.pl
==============================================================================
--- trunk/tools/build/nativecall.pl     (original)
+++ trunk/tools/build/nativecall.pl     Fri Apr 27 04:30:50 2007
@@ -511,7 +511,7 @@
     /[EMAIL PROTECTED]/ && do {
         push @{$temps_ref},          "PMC *t_$temp_num;";
         push @{$extra_preamble_ref}, "t_$temp_num = GET_NCI_P($reg_num);";
-        return "t_$temp_num == PMCNULL ? NULL : t_$temp_num";
+        return "PMC_IS_NULL(t_$temp_num) ? NULL : t_$temp_num";
     };
     /S/ && do {
         push @{$temps_ref},          "STRING *t_$temp_num;";

Reply via email to