Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-36876: [c-analyzer tool] Additional CLI updates for "capi" command.#23929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ericsnowcurrently merged 9 commits intopython:masterfromericsnowcurrently:show-capi
Dec 25, 2020
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Clean up incomplete line parsing.
  • Loading branch information
@ericsnowcurrently
ericsnowcurrently committedDec 25, 2020
commit33d05472766f68a28505a13e8c6ed7c92f284b02
25 changes: 14 additions & 11 deletionsTools/c-analyzer/cpython/_capi.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -122,21 +122,24 @@ def _parse_line(line, prev=None):
results = zip(KINDS, m.groups())
for kind, name in results:
if name:
clean = last.split('//')[0].strip()
clean = last.split('//')[0].rstrip()
if clean.endswith('*/'):
clean = clean.split('/*')[0].rstrip()

if kind == 'macro' or kind == 'constant':
if clean.endswith('\\'):
returnline # the new "prev"
ifnotclean.endswith('\\'):
returnname, kind
elif kind == 'inline':
if not prev:
if not clean.endswith('}'):
return line # the new "prev"
elif clean != '}':
return line # the new "prev"
elif not clean.endswith(';'):
return line # the new "prev"
return name, kind
if clean.endswith('}'):
if not prev or clean == '}':
return name, kind
elif kind == 'func' or kind == 'data':
if clean.endswith(';'):
return name, kind
else:
# This should not be reached.
raise NotImplementedError
return line # the new "prev"
# It was a plain #define.
return None

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp