Support void* arguments as arrays of bytes by default instead of pointers.

This commit is contained in:
Mark VanderVoord
2015-08-18 13:28:29 -04:00
parent f17d1a933b
commit 1fdfb61891
4 changed files with 84 additions and 2 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ class CMockConfig
'uint32_t' => 'HEX32',
'UINT32' => 'HEX32',
'UINT32_T' => 'HEX32',
'void*' => 'PTR',
'void*' => 'HEX8_ARRAY',
'unsigned short' => 'HEX16',
'uint16' => 'HEX16',
'uint16_t' => 'HEX16',
+1 -1
View File
@@ -139,7 +139,7 @@ class CMockHeaderParser
return args if (arg =~ /^\s*((\.\.\.)|(void))\s*$/) # we're done if we reach void by itself or ...
arg_array = arg.split
arg_elements = arg_array - @c_attributes # split up words and remove known attributes
args << { :type => (arg_type =arg_elements[0..-2].join(' ')),
args << { :type => (arg_type = arg_elements[0..-2].join(' ')),
:name => arg_elements[-1],
:ptr? => divine_ptr(arg_type),
:const? => arg_array.include?('const')