mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 03:03:57 +08:00
Tiny performance tweaks
darcs-hash:20060205131335-ac50b-5b1895d50334dfe9e375ab60e723d1b62b712707.gz
This commit is contained in:
parent
0fa3c15114
commit
8e05c8bee8
|
@ -188,7 +188,7 @@ void read_message( connection_t *src )
|
|||
}
|
||||
else
|
||||
{
|
||||
sb_printf( &src->input, L"%lc", res );
|
||||
sb_append_char( &src->input, res );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
11
intern.c
11
intern.c
|
@ -25,14 +25,6 @@ static hash_table_t *intern_table=0;
|
|||
*/
|
||||
static hash_table_t *intern_static_table=0;
|
||||
|
||||
/**
|
||||
Load static strings that are universally common. Currently only loads the empty string.
|
||||
*/
|
||||
static void intern_load_common_static()
|
||||
{
|
||||
intern_static( L"" );
|
||||
}
|
||||
|
||||
const wchar_t *intern( const wchar_t *in )
|
||||
{
|
||||
const wchar_t *res=0;
|
||||
|
@ -40,9 +32,6 @@ const wchar_t *intern( const wchar_t *in )
|
|||
if( !in )
|
||||
return 0;
|
||||
|
||||
intern_load_common_static();
|
||||
|
||||
|
||||
if( !intern_table )
|
||||
{
|
||||
intern_table = malloc( sizeof( hash_table_t ) );
|
||||
|
|
11
util.c
11
util.c
|
@ -907,19 +907,16 @@ void sb_append_substring( string_buffer_t *b, const wchar_t *s, size_t l )
|
|||
|
||||
void sb_append_char( string_buffer_t *b, wchar_t c )
|
||||
{
|
||||
wchar_t buff[2]=
|
||||
{
|
||||
c, 0
|
||||
}
|
||||
;
|
||||
wchar_t tmp=0;
|
||||
|
||||
if( !b )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
sb_append( b, buff );
|
||||
|
||||
b_append( b, &c, sizeof(wchar_t) );
|
||||
b_append( b, &tmp, sizeof(wchar_t) );
|
||||
b->used -= sizeof(wchar_t);
|
||||
}
|
||||
|
||||
void sb_append2( string_buffer_t *b, ... )
|
||||
|
|
Loading…
Reference in New Issue
Block a user