File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -228,15 +228,18 @@ def OutOfHeader(line):
228228 return lines .getValue ()
229229
230230def removeSubroutinePrototypes (source ):
231- expression = re .compile (
232- r'/\* Subroutine \*/^\s*(?:(?:inline|static)\s+){0,2}(?!else|typedef|return)\w+\s+\*?\s*(\w+)\s*\([^0]+\)\s*;?'
233- )
234- lines = LineQueue ()
235- for line in UStringIO (source ):
236- if not expression .match (line ):
237- lines .add (line )
238-
239- return lines .getValue ()
231+ # This function has never worked as advertised by its name:
232+ # - "/* Subroutine */" declarations may span multiple lines and
233+ # cannot be matched by a line by line approach.
234+ # - The caret in the initial regex would prevent any match, even
235+ # of single line "/* Subroutine */" declarations.
236+ #
237+ # While we could "fix" this function to do what the name implies
238+ # it should do, we have no hint of what it should really do.
239+ #
240+ # Therefore we keep the existing (non-)functionaity, documenting
241+ # this function as doing nothing at all.
242+ return source
240243
241244def removeBuiltinFunctions (source ):
242245 lines = LineQueue ()
You can’t perform that action at this time.
0 commit comments