Rust gen-c-headers: keep 'const' attribute

pull/2814/head
Pierre Chifflier 9 years ago committed by Victor Julien
parent 4fe9292ed8
commit 4f677fd157

@ -99,12 +99,14 @@ def convert_type(rs_type):
if mod in [ if mod in [
"*mut", "*mut",
"* mut", "* mut",
"*const",
"* const",
"&mut", "&mut",
"&'static mut", "&'static mut",
]: ]:
return "%s *" % (type_map[rtype]) return "%s *" % (type_map[rtype])
elif mod in [
"*const",
"* const"]:
return "const %s *" % (type_map[rtype])
elif mod in [ elif mod in [
"*mut *const", "*mut *const",
"*mut*const"]: "*mut*const"]:

Loading…
Cancel
Save