aboutsummaryrefslogtreecommitdiff
path: root/compilers.py
diff options
context:
space:
mode:
authorjpakkane <jpakkane@gmail.com>2015-05-21 21:46:17 +0300
committerjpakkane <jpakkane@gmail.com>2015-05-21 21:46:17 +0300
commit776fc1ad55795542676995921be5ba506f903d0d (patch)
treeffca7e87aecf1dd49bd1346f9621099083f6e786 /compilers.py
parent0ba1d545afe021e09090f434d5242ae942e7d5b4 (diff)
parent46804d4fe6985da8ea1de99792c506a24e469489 (diff)
downloadmeson-776fc1ad55795542676995921be5ba506f903d0d.zip
meson-776fc1ad55795542676995921be5ba506f903d0d.tar.gz
meson-776fc1ad55795542676995921be5ba506f903d0d.tar.bz2
Merge pull request #125 from ignatenkobrain/master
add has_type method
Diffstat (limited to 'compilers.py')
-rw-r--r--compilers.py8
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']