diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-01 20:13:46 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-01-01 20:13:46 +0200 |
commit | 221f175cfb9625e21a39794fb5488b54378c5e73 (patch) | |
tree | ff68da11eb6ddb5125cf3cf72e1ec6841785083e | |
parent | 1892e92a93c4a261fa030118b66cd7bbb02bf62f (diff) | |
download | meson-221f175cfb9625e21a39794fb5488b54378c5e73.zip meson-221f175cfb9625e21a39794fb5488b54378c5e73.tar.gz meson-221f175cfb9625e21a39794fb5488b54378c5e73.tar.bz2 |
Make C test program not compile under C++.
-rwxr-xr-x | environment.py | 6 | ||||
-rwxr-xr-x | interpreter.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/environment.py b/environment.py index 786607e..227b5f0 100755 --- a/environment.py +++ b/environment.py @@ -61,10 +61,10 @@ class CCompiler(): return ' '.join(self.exelist) def sanity_check(self, work_dir): - source_name = os.path.join(work_dir, 'sanitycheck.c') - binary_name = os.path.join(work_dir, 'sanitycheck') + source_name = os.path.join(work_dir, 'sanitycheckc.c') + binary_name = os.path.join(work_dir, 'sanitycheckc') ofile = open(source_name, 'w') - ofile.write('int main(int argc, char **argv) { return 0; }\n') + ofile.write('int main(int argc, char **argv) { int class=0; return class; }\n') ofile.close() pc = subprocess.Popen(self.exelist + [source_name, '-o', binary_name]) pc.wait() diff --git a/interpreter.py b/interpreter.py index 4d28ce6..2b12db3 100755 --- a/interpreter.py +++ b/interpreter.py @@ -65,7 +65,7 @@ class Executable(BuildTarget): pass class Interpreter(): - + def __init__(self, code, scratch_dir): self.ast = parser.build_ast(code) self.sanity_check_ast() |