From: Pierre Chifflier Date: Mon, 19 Jun 2017 11:20:07 +0000 (+0200) Subject: Rust gen-c-headers: keep 'const' attribute X-Git-Tag: suricata-4.0.0-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f677fd157baacd41383761f4bb8c33636a5f3f7;p=thirdparty%2Fsuricata.git Rust gen-c-headers: keep 'const' attribute --- diff --git a/rust/gen-c-headers.py b/rust/gen-c-headers.py index fe96e3fd2f..3200ad3309 100755 --- a/rust/gen-c-headers.py +++ b/rust/gen-c-headers.py @@ -99,12 +99,14 @@ def convert_type(rs_type): if mod in [ "*mut", "* mut", - "*const", - "* const", "&mut", "&'static mut", ]: return "%s *" % (type_map[rtype]) + elif mod in [ + "*const", + "* const"]: + return "const %s *" % (type_map[rtype]) elif mod in [ "*mut *const", "*mut*const"]: