|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-07-04 10:35:10
David Abrahams wrote:
> Update of /cvsroot/boost/boost/tools/build/jam_src
> In directory usw-pr-cvs1:/tmp/cvs-serv12198
>
> Modified Files:
> newstr.c
> [snip]
> +
> +/*
> + * allocate() - Allocate n bytes of immortal string storage
> + */
> +static char* allocate(size_t n)
> +{
> [snip]
> +/*
> * newstr() - return a malloc'ed copy of a string
> */
>
> @@ -50,7 +107,7 @@
> if( hashenter( strhash, (HASHDATA **)&s ) )
> {
> int l = strlen( string );
> - char *m = (char *)malloc( l + 1 );
> + char *m = (char *)allocate( l + 1 );
>
> strtotal += l + 1;
> memcpy( m, string, l + 1 );
Seems to me that the comment about "malloc"'ed copy is a little out-of-date
now. Sorry for been that picky ;-)
- Volodya
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk