diff options
author | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2015-05-21 19:10:01 +0300 |
---|---|---|
committer | Igor Gnatenko <i.gnatenko.brain@gmail.com> | 2015-05-21 19:10:01 +0300 |
commit | 46804d4fe6985da8ea1de99792c506a24e469489 (patch) | |
tree | ffca7e87aecf1dd49bd1346f9621099083f6e786 /compilers.py | |
parent | 0ba1d545afe021e09090f434d5242ae942e7d5b4 (diff) | |
download | meson-46804d4fe6985da8ea1de99792c506a24e469489.zip meson-46804d4fe6985da8ea1de99792c506a24e469489.tar.gz meson-46804d4fe6985da8ea1de99792c506a24e469489.tar.bz2 |
add has_type method
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'compilers.py')
-rw-r--r-- | compilers.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compilers.py b/compilers.py index 5e66b23..b86c6c9 100644 --- a/compilers.py +++ b/compilers.py @@ -401,6 +401,14 @@ void bar() { ''' return self.compiles(templ % (prefix, typename, membername)) + def has_type(self, typename, prefix): + templ = '''%s +void bar() { + sizeof(%s); +}; +''' + return self.compiles(templ % (prefix, typename)) + def thread_flags(self): return ['-pthread'] |