Merge pull request #28 from jlesage/master_for_pull_request2

Properly mark the 'const' state of a function's return type. (Thanks Jocelyn!)
This commit is contained in:
Mark VanderVoord
2014-05-06 09:56:48 -04:00
+1 -1
View File
@@ -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')
}