develooper Front page | perl.perl6.internals | Postings from January 2002

[PATCH] string_transcode

Thread Previous
From:
Peter Gibbs
Date:
January 1, 2002 02:22
Subject:
[PATCH] string_transcode
Message ID:
001b01c192ae$3432e500$0b01010a@emkel.co.za
I suspect that the length of the output buffer for string_transcode should
be based on the output encoding, not on the input encoding.

Peter Gibbs
EmKel Systems

Index: string.c
===================================================================
RCS file: /home/perlcvs/parrot/string.c,v
retrieving revision 1.33
diff -c -r1.33 string.c
*** string.c    31 Dec 2001 17:23:03 -0000      1.33
--- string.c    1 Jan 2002 10:11:56 -0000
***************
*** 154,160 ****
          return string_copy(interpreter, src);
      }

!     dest = string_make(interpreter, NULL,
src->strlen*src->encoding->max_bytes
,
                         encoding, 0, type);

      if (src->type != dest->type) {
--- 154,160 ----
          return string_copy(interpreter, src);
      }

!     dest = string_make(interpreter, NULL, src->strlen*encoding->max_bytes,
                         encoding, 0, type);

      if (src->type != dest->type) {



Thread Previous


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