Fix recent const changes to account for special (char*) handling.

This commit is contained in:
John Lindgren
2017-09-08 15:20:57 -04:00
parent 27c5a9cff5
commit ef04f4ab7f
2 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -154,7 +154,7 @@ class CMockHeaderParser
#
arg_array = arg.split
ptr_const_info = divine_ptr_and_const(arg)
arg_elements = arg_array - (ptr_const_info[:ptr?] ? @c_attr_noconst : @c_attributes)
arg_elements = arg_array - (arg.include?('*') ? @c_attr_noconst : @c_attributes)
args << { :type => arg_elements[0..(ptr_const_info[:const_ptr?] ? -3 : -2)].join(' '),
:name => arg_elements[-1]
}.merge(ptr_const_info)