summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Quirk <richard.quirk@gmail.com>2011-12-24 10:21:03 +0100
committerRichard Quirk <richard.quirk@gmail.com>2011-12-24 10:21:03 +0100
commit59cc4a7db4a7278b349998455753c7022bfe4793 (patch)
tree8bf48da9de3eb29f7e5045319974594c95a506c0
parentf0b244ae1aff7ff3a686b0dac557d764e91a1e98 (diff)
downloadscons-59cc4a7db4a7278b349998455753c7022bfe4793.tar.gz
Fix missing type_name declaration in error path
The symbol type_name is not declared in this scope. It looks like the line that this change fixes was copied from elsewhere and not updated with the correct 'symbol' variable previously.
-rw-r--r--src/engine/SCons/Conftest.py2
-rw-r--r--src/engine/SCons/SConfTests.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/engine/SCons/Conftest.py b/src/engine/SCons/Conftest.py
index 04a6bc2a..d4662780 100644
--- a/src/engine/SCons/Conftest.py
+++ b/src/engine/SCons/Conftest.py
@@ -554,7 +554,7 @@ def CheckDeclaration(context, symbol, includes = None, language = None):
lang, suffix, msg = _lang2suffix(language)
if msg:
- context.Display("Cannot check for declaration %s: %s\n" % (type_name, msg))
+ context.Display("Cannot check for declaration %s: %s\n" % (symbol, msg))
return msg
src = includetext + includes
diff --git a/src/engine/SCons/SConfTests.py b/src/engine/SCons/SConfTests.py
index b05c4cc8..e6048860 100644
--- a/src/engine/SCons/SConfTests.py
+++ b/src/engine/SCons/SConfTests.py
@@ -697,6 +697,8 @@ int main() {
assert r, "__cplusplus not declared in C++ ??"
r = sconf.CheckDeclaration('__cplusplus', language = 'C')
assert not r, "__cplusplus declared in C ??"
+ r = sconf.CheckDeclaration('unknown', language = 'Unknown')
+ assert not r, "unknown language was supported ??"
finally:
sconf.Finish()