-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(aspect): Patch RecursionError in pcpp
Fixes: #300
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- pcpp/preprocessor.py | ||
+++ pcpp/preprocessor.py | ||
@@ -558,6 +558,8 @@ class Preprocessor(PreprocessorHooks): | ||
for tok in tokens: | ||
if not hasattr(tok, 'expanded_from'): | ||
tok.expanded_from = [] | ||
+ if len(expanding_from) == 1 and tok.value == expanding_from[0]: | ||
+ return tokens | ||
i = 0 | ||
#print("*** EXPAND MACROS in", "".join([t.value for t in tokens]), "expanding_from=", expanding_from) | ||
#print(tokens) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters