From c7b1381674d46e0f28b536ac7618d71987f25936 Mon Sep 17 00:00:00 2001 From: axel Date: Sat, 8 Oct 2005 12:03:30 +1000 Subject: [PATCH] Don't allocate new buffers for tokenizer. Performance increase darcs-hash:20051008020330-ac50b-b2bd907490a73e50db545785caf9fd2a0c639495.gz --- tokenizer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokenizer.c b/tokenizer.c index 6a012fe21..6f861b87e 100644 --- a/tokenizer.c +++ b/tokenizer.c @@ -138,7 +138,7 @@ void tok_init( tokenizer *tok, const wchar_t *b, int flags ) } tok->has_next = (*b != L'\0'); - tok->orig_buff = tok->buff = wcsdup(b); + tok->orig_buff = tok->buff = /*wcsdup*/(b); if( !tok->orig_buff ) { @@ -163,7 +163,7 @@ void tok_init( tokenizer *tok, const wchar_t *b, int flags ) void tok_destroy( tokenizer *tok ) { free( tok->last ); - free( tok->orig_buff ); +// free( tok->orig_buff ); } int tok_last_type( tokenizer *tok )