diff options
author | Neil Booth <neil@daikokuya.demon.co.uk> | 2000-12-17 22:40:32 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-12-17 22:40:32 +0000 |
commit | 49fe13f6d8cfe7f3450608a4444b2f9a5b04de35 (patch) | |
tree | b4e313ee5aef2ba124bf4a22afc2b003099d78c8 /gcc/cppmacro.c | |
parent | ed972b14ec2ef437ca42b0136fe466aed04fed7a (diff) | |
download | gcc-49fe13f6d8cfe7f3450608a4444b2f9a5b04de35.zip gcc-49fe13f6d8cfe7f3450608a4444b2f9a5b04de35.tar.gz gcc-49fe13f6d8cfe7f3450608a4444b2f9a5b04de35.tar.bz2 |
cpplib.h (struct cpp_reader): Remove references to string_pool and temp_string_pool.
* cpplib.h (struct cpp_reader): Remove references to string_pool
and temp_string_pool.
* cppinit.c (cpp_create_reader, cpp_cleanup): Similarly; using
ident_pool in place.
* cpplex.c (parse_number, unescaped_terminator_p, parse_string,
save_comment, cpp_token_as_text): Similarly.
* cpplib.c (do_define, glue_header_name, parse_assertion): Similarly.
* cppmacro.c (make_number_token, builtin_macro, lock_pools,
unlock_pools, stringify_arg, paste_tokens): Similarly.
From-SVN: r38336
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index 2290093..8af9fab 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -125,7 +125,7 @@ make_number_token (pfile, token, number) cpp_token *token; int number; { - unsigned char *buf = _cpp_pool_alloc (pfile->string_pool, 20); + unsigned char *buf = _cpp_pool_alloc (&pfile->ident_pool, 20); sprintf ((char *) buf, "%d", number); token->type = CPP_NUMBER; @@ -162,7 +162,7 @@ builtin_macro (pfile, token) buffer = buffer->prev; name = buffer->nominal_fname; - make_string_token (pfile->string_pool, token, + make_string_token (&pfile->ident_pool, token, (const unsigned char *) name, strlen (name)); } break; @@ -237,7 +237,6 @@ static void lock_pools (pfile) cpp_reader *pfile; { - _cpp_lock_pool (&pfile->temp_string_pool); _cpp_lock_pool (&pfile->argument_pool); } @@ -245,7 +244,6 @@ static void unlock_pools (pfile) cpp_reader *pfile; { - _cpp_unlock_pool (&pfile->temp_string_pool); _cpp_unlock_pool (&pfile->argument_pool); } @@ -288,7 +286,7 @@ stringify_arg (pfile, arg) cpp_reader *pfile; macro_arg *arg; { - cpp_pool *pool = pfile->string_pool; + cpp_pool *pool = &pfile->ident_pool; unsigned char *start = POOL_FRONT (pool); unsigned int i, escape_it, total_len = 0, backslash_count = 0; @@ -397,10 +395,8 @@ paste_tokens (pfile, lhs, rhs) { unsigned int total_len = cpp_token_len (lhs) + cpp_token_len (rhs); unsigned char *result, *end; - cpp_pool *pool; - pool = type == CPP_NAME ? &pfile->ident_pool: pfile->string_pool; - result = _cpp_pool_alloc (pool, total_len + 1); + result = _cpp_pool_alloc (&pfile->ident_pool, total_len + 1); /* Paste the spellings and null terminate. */ end = cpp_spell_token (pfile, rhs, cpp_spell_token (pfile, lhs, result)); |