diff --git a/lib/cmock_header_parser.rb b/lib/cmock_header_parser.rb index 55466e9..eb36f2e 100644 --- a/lib/cmock_header_parser.rb +++ b/lib/cmock_header_parser.rb @@ -74,7 +74,7 @@ class CMockHeaderParser # remove preprocessor statements and extern "C" source.gsub!(/^\s*#.*/, '') - source.gsub!(/extern\s+\"C\"\s+\{/, '') + source.gsub!(/extern\s+\"C\"\s*\{/, '') # enums, unions, structs, and typedefs can all contain things (e.g. function pointers) that parse like function prototypes, so yank them # forward declared structs are removed before struct definitions so they don't mess up real thing later. we leave structs keywords in function prototypes