summaryrefslogtreecommitdiff
path: root/cffi/cparser.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2015-11-02 21:27:27 +0100
committerArmin Rigo <arigo@tunes.org>2015-11-02 21:27:27 +0100
commitb1847f50a09cbdea1dc923eace347e6c9cf84791 (patch)
tree66428bf12390ee63db23669ea7c22d1b9f77e620 /cffi/cparser.py
parent20620bc23047ac7881c6bc1405d09372e2a2a694 (diff)
downloadcffi-b1847f50a09cbdea1dc923eace347e6c9cf84791.tar.gz
Propagate "volatile" in addition to "const" and "restrict"
Diffstat (limited to 'cffi/cparser.py')
-rw-r--r--cffi/cparser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cffi/cparser.py b/cffi/cparser.py
index eb7d383..9db84cf 100644
--- a/cffi/cparser.py
+++ b/cffi/cparser.py
@@ -348,6 +348,8 @@ class Parser(object):
pycparser.c_ast.PtrDecl)):
if 'const' in type.quals:
quals |= model.Q_CONST
+ if 'volatile' in type.quals:
+ quals |= model.Q_VOLATILE
if 'restrict' in type.quals:
quals |= model.Q_RESTRICT
return quals