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

gh-111903: Update AC to support "pycore_critical_section.h" header#112251

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
corona10 merged 3 commits intopython:mainfromcorona10:gh-111903
Nov 19, 2023

Conversation

@corona10
Copy link
Member

@corona10corona10 commentedNov 18, 2023
edited by bedevere-appbot
Loading

erlend-aasland reacted with thumbs up emoji
@corona10
Copy link
MemberAuthor

@colesbury IMO, we don't have to declare#include "pycore_critical_section.h" for AC things.

Copy link
Contributor

@colesburycolesbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice! LGTM

# include"pycore_gc.h"// PyGC_Head
# include"pycore_runtime.h"// _Py_ID()
#endif
#include"pycore_critical_section.h"// Py_BEGIN_CRITICAL_SECTION()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The formatting isn't great here: it would be nice if the generated code had at least one space (preferably two) before each inline comment

Copy link
Member

@AlexWaygoodAlexWaygoodNov 19, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(This can be dealt with in a followup PR, though, if you'd prefer to merge this one quickly :)

Copy link
MemberAuthor

@corona10corona10Nov 19, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

IMO, It will affect the overall generated code formatting since we have to touch

ifinclude.reason:
comment=f'//{include.reason}\n'
line=line.ljust(INCLUDE_COMMENT_COLUMN-1)+comment
output+=line

So, let's handle it as a separate PR,@AlexWaygood would you like to touch it?
(Easy way might just updatingINCLUDE_COMMENT_COLUMN but there might be smarter policy rather than fixed policy)

AlexWaygood reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Simply updatingINCLUDE_COMMENT_COLUMN to 38 will resolve this issue.
But IMO, this value should be adaptively chosen.

AlexWaygood reacted with thumbs up emoji
Copy link
Member

@AlexWaygoodAlexWaygoodNov 19, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'll try to find some time in the next few days to look at it, but can't guarantee it right now!

Anyway, I'm happy to defer this for now; it's definitely not the most important thing in the world :)

corona10 reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@colesburycolesburycolesbury approved these changes

@AlexWaygoodAlexWaygoodAlexWaygood approved these changes

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

@rhettingerrhettingerAwaiting requested review from rhettingerrhettinger is a code owner

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@corona10@colesbury@AlexWaygood

[8]ページ先頭

©2009-2025 Movatter.jp