develooper Front page | perl.perl6.internals | Postings from December 2001

Correction to string patch

From:
Peter Gibbs
Date:
December 30, 2001 23:03
Subject:
Correction to string patch
Message ID:
003901c191c9$45df4a40$0b01010a@emkel.co.za
David

In your last change (splitting buffer allocation from string) I assume you
also intended to shorten the initial allocation.

Peter Gibbs
EmKel Systems

Index: string.c
===================================================================
RCS file: /home/perlcvs/parrot/string.c,v
retrieving revision 1.30
diff -c -r1.30 string.c
*** string.c    30 Dec 2001 21:08:48 -0000      1.30
--- string.c    31 Dec 2001 06:55:56 -0000
***************
*** 44,50 ****
        encoding = encoding_lookup(type->default_encoding);
      }

!     s = mem_sys_allocate(sizeof(STRING)+buflen);
      s->bufstart = mem_sys_allocate(buflen+1);
      s->encoding = encoding;
      s->flags = flags;
--- 44,50 ----
        encoding = encoding_lookup(type->default_encoding);
      }

!     s = mem_sys_allocate(sizeof(STRING));
      s->bufstart = mem_sys_allocate(buflen+1);
      s->encoding = encoding;
      s->flags = flags;

--





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