Author: leo
Date: Thu Nov 10 06:18:52 2005
New Revision: 9879
Modified:
trunk/src/string.c
Log:
unicode improvements - repeat
* string_repeat should now handle all charsets and encodings
Tests welcome
Modified: trunk/src/string.c
==============================================================================
--- trunk/src/string.c (original)
+++ trunk/src/string.c Thu Nov 10 06:18:52 2005
@@ -1028,10 +1028,10 @@ string_repeat(Interp *interpreter, const
STRING *dest;
UINTVAL i;
- dest = string_make_empty(interpreter, enum_stringrep_one, s->strlen * num);
+ dest = string_make_direct(interpreter, NULL,
+ s->bufused * num,
+ s->encoding, s->charset, 0);
- /* dest = string_make(interpreter, NULL, s->bufused * num, s->encoding, 0,
- s->type); */
if (num == 0) {
return dest;
}