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

Re: Correction to string patch

From:
David & Lisa Jacobs
Date:
December 31, 2001 01:18
Subject:
Re: Correction to string patch
Message ID:
001901c191ce$de407020$6401a8c0@jacobs
Ooops :-).  Yes I did.

David

----- Original Message -----
From: "Peter Gibbs" <peter@emkel.co.za>
> In your last change (splitting buffer allocation from string) I assume you
> also intended to shorten the initial allocation.
>
> 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