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

bacek at svn.parrot.org bacek at svn.parrot.org
Sun May 31 13:42:59 UTC 2009


Author: bacek
Date: Sun May 31 13:42:59 2009
New Revision: 39288
URL: https://trac.parrot.org/parrot/changeset/39288

Log:
Revert r39287.

This is big regression. pmichaud++ for explanations.

Modified:
   trunk/src/string/api.c

Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c	Sun May 31 13:19:40 2009	(r39287)
+++ trunk/src/string/api.c	Sun May 31 13:42:59 2009	(r39288)
@@ -2142,15 +2142,6 @@
     FLOATVAL    f;
     char       *cstr;
     const char *p;
-    STRING     *tmp;
-
-    /* We can't use cstring for non cstring */
-    if (s->encoding->max_bytes_per_codepoint != 1) {
-        /* Avoid COW. We aren't going to share strings */
-        tmp = Parrot_str_repeat(interp, s, 1);
-        tmp = Parrot_ascii_charset_ptr->to_charset(interp, tmp, NULL);
-        return Parrot_str_to_num(interp, tmp);
-    }
 
     /*
      * XXX C99 atof interprets 0x prefix


More information about the parrot-commits mailing list