From 027648a9b27cc71de3337052b47ca964943f6bec Mon Sep 17 00:00:00 2001 From: Jocelyn Le Sage Date: Tue, 6 May 2014 08:27:31 -0400 Subject: [PATCH] Properly mark the 'const' state of a fonction's return type. --- lib/cmock_header_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmock_header_parser.rb b/lib/cmock_header_parser.rb index 0cb14dc..141d1ec 100644 --- a/lib/cmock_header_parser.rb +++ b/lib/cmock_header_parser.rb @@ -223,7 +223,7 @@ class CMockHeaderParser decl[:return] = { :type => rettype, :name => 'cmock_to_return', :ptr? => divine_ptr(rettype), - :const? => rettype.split(/\s/).include?('const'), + :const? => decl[:modifier].split(/\s/).include?('const'), :str => "#{rettype} cmock_to_return", :void? => (rettype == 'void') }