mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
Don't allocate new buffers for tokenizer. Performance increase
darcs-hash:20051008020330-ac50b-b2bd907490a73e50db545785caf9fd2a0c639495.gz
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user