[svn:parrot] r47626 - trunk/src/pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Mon Jun 14 18:07:56 UTC 2010


Author: NotFound
Date: Mon Jun 14 18:07:56 2010
New Revision: 47626
URL: https://trac.parrot.org/parrot/changeset/47626

Log:
drop pointless NULL checks in StringHandle clone

Modified:
   trunk/src/pmc/stringhandle.pmc

Modified: trunk/src/pmc/stringhandle.pmc
==============================================================================
--- trunk/src/pmc/stringhandle.pmc	Mon Jun 14 17:55:01 2010	(r47625)
+++ trunk/src/pmc/stringhandle.pmc	Mon Jun 14 18:07:56 2010	(r47626)
@@ -109,12 +109,9 @@
         PMC * const copy = Parrot_pmc_new(INTERP, enum_class_StringHandle);
         Parrot_StringHandle_attributes * const data_struct = PARROT_STRINGHANDLE(copy);
 
-        if (old_struct->stringhandle != NULL)
-            data_struct->stringhandle = old_struct->stringhandle;
-        if (old_struct->mode != NULL)
-            data_struct->mode     = old_struct->mode;
-        if (old_struct->encoding != NULL)
-            data_struct->encoding = old_struct->encoding;
+        data_struct->stringhandle = old_struct->stringhandle;
+        data_struct->mode     = old_struct->mode;
+        data_struct->encoding = old_struct->encoding;
         data_struct->flags    = old_struct->flags;
 
         return copy;


More information about the parrot-commits mailing list