From 07e53228001f2c40c9266244a1eca496c3777e0b Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 9 May 2008 18:48:20 +0000 Subject: [PATCH] simple fix to token-pasting problem --- dtool/src/cppparser/cppPreprocessor.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index 24efb3c508..ea9bece22c 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -320,7 +320,10 @@ get_next_token0() { if (token._token == '#') { // Stringify. token = internal_get_next_token(); - if (token._token == SIMPLE_IDENTIFIER || token._token == STRING) { + if (token._token == SIMPLE_IDENTIFIER || + token._token == INTEGER || + token._token == REAL || + token._token == STRING) { token._token = STRING; } else { // Stringify nothing. @@ -370,7 +373,9 @@ get_next_token0() { // The token-pasting operator creates one continuous // identifier across whitespace. token = internal_get_next_token(); - if (token._token == SIMPLE_IDENTIFIER) { + if (token._token == SIMPLE_IDENTIFIER || + token._token == INTEGER || + token._token == REAL) { name += token._lval.str; ident->_names.back().append_name(token._lval.str);