mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-09 12:47:50 +00:00
Support void* arguments as arrays of bytes by default instead of pointers.
This commit is contained in:
+1
-1
@@ -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',
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user