Don't allocate new buffers for tokenizer. Performance increase

darcs-hash:20051008020330-ac50b-b2bd907490a73e50db545785caf9fd2a0c639495.gz
This commit is contained in:
axel
2005-10-08 12:03:30 +10:00
parent bc0bd35385
commit c7b1381674

View File

@@ -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 )