develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35974 - trunk/src

From:
julianalbo
Date:
January 24, 2009 14:54
Subject:
[svn:parrot] r35974 - trunk/src
Message ID:
20090124225356.1D3C1CB9AE@x12.develooper.com
Author: julianalbo
Date: Sat Jan 24 14:53:55 2009
New Revision: 35974

Modified:
   trunk/src/library.c

Log:
quick fix for TT #65

Modified: trunk/src/library.c
==============================================================================
--- trunk/src/library.c	(original)
+++ trunk/src/library.c	Sat Jan 24 14:53:55 2009
@@ -794,9 +794,16 @@
         ARGOUT(STRING **wo_ext), ARGOUT(STRING **ext))
 {
     ASSERT_ARGS(parrot_split_path_ext)
-    STRING * const slash1 = CONST_STRING(interp, "/");
-    STRING * const slash2 = CONST_STRING(interp, "\\");
-    STRING * const dot    = CONST_STRING(interp, ".");
+
+    /* This is a quick fix for TT #65
+     * TODO: redo it with the string reimplementation
+     */
+    const char * charset = Parrot_charset_c_name(interp,
+        Parrot_charset_number_of_str(interp, in) );
+    STRING * const slash1 = string_make(interp, "/", 1, charset, PObj_external_FLAG|PObj_constant_FLAG);
+    STRING * const slash2 = string_make(interp, "\\", 1, charset, PObj_external_FLAG|PObj_constant_FLAG);
+    STRING * const dot    = string_make(interp, ".", 1, charset, PObj_external_FLAG|PObj_constant_FLAG);
+
     const INTVAL len = string_length(interp, in);
     STRING *stem;
     INTVAL pos_sl, pos_dot;



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About