Make what the final code is doing a bit more clear to slow readers like me.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -568,12 +568,18 @@ class KernelDoc: · 567 unmodified lines | ||
| 568 | 568 | |
| 569 | 569 | bitfield_re = KernRe(r'(.*?):(\w+)') |
| 570 | 570 | for param in args: |
| 571 | + # | |
| 572 | + # For pointers, shift the star(s) from the variable name to the | |
| 573 | + # type declaration. | |
| 574 | + # | |
| 571 | 575 | r = KernRe(r'^(\*+)\s*(.*)') |
| 572 | 576 | if r.match(param): |
| 573 | 577 | self.push_parameter(ln, decl_type, r.group(2), |
| 574 | 578 | f"{dtype} {r.group(1)}", |
| 575 | 579 | arg, declaration_name) |
| 576 | − | |
| 580 | + # | |
| 581 | + # Perform a similar shift for bitfields. | |
| 582 | + # | |
| 577 | 583 | elif bitfield_re.search(param): |
| 578 | 584 | if dtype != "": # Skip unnamed bit-fields |
| 579 | 585 | self.push_parameter(ln, decl_type, bitfield_re.group(1), |