[svn:parrot] r42564 - trunk/src/string

chromatic at svn.parrot.org chromatic at svn.parrot.org
Tue Nov 17 21:25:55 UTC 2009


Author: chromatic
Date: Tue Nov 17 21:25:54 2009
New Revision: 42564
URL: https://trac.parrot.org/parrot/changeset/42564

Log:
[STRING] Ensured that charsets and encodings get initialized before
initializing STRINGNULL.  This should fix any compilation errors from r45263.

Modified:
   trunk/src/string/api.c

Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c	Tue Nov 17 21:14:01 2009	(r42563)
+++ trunk/src/string/api.c	Tue Nov 17 21:25:54 2009	(r42564)
@@ -295,12 +295,6 @@
         Parrot_srand(Parrot_intval_time());
         interp->hash_seed = Parrot_uint_rand(0);
     }
-
-    /* initialize STRINGNULL, but not in the constant table */
-    STRINGNULL = Parrot_str_new_init(interp, NULL, 0,
-                       PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
-                       PObj_constant_FLAG);
-
     /* initialize the constant string table */
     if (interp->parent_interpreter) {
         interp->const_cstring_table =
@@ -315,6 +309,11 @@
     interp->const_cstring_hash  = const_cstring_hash;
     Parrot_charsets_encodings_init(interp);
 
+    /* initialize STRINGNULL, but not in the constant table */
+    STRINGNULL = Parrot_str_new_init(interp, NULL, 0,
+                       PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+                       PObj_constant_FLAG);
+
     interp->const_cstring_table =
         mem_allocate_n_zeroed_typed(n_parrot_cstrings, STRING *);
 


More information about the parrot-commits mailing list