Skip to content

[3.11] gh-92781: Avoid mixing declarations and code in C API (#92783) #92813

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2022
Merged

[3.11] gh-92781: Avoid mixing declarations and code in C API (#92783) #92813

merged 1 commit into from
May 16, 2022

Conversation

vstinner
Copy link
Member

Avoid mixing declarations and code in the C API to fix the compiler
warning: "ISO C90 forbids mixed declarations and code"
[-Werror=declaration-after-statement].

(cherry picked from commit 90e7230)

Avoid mixing declarations and code in the C API to fix the compiler
warning: "ISO C90 forbids mixed declarations and code"
[-Werror=declaration-after-statement].

(cherry picked from commit 90e7230)
@vstinner
Copy link
Member Author

I fixed manually conflicts when backporting to 3.11. The 3.11 branch uses a few less static inline functions and so has less issues.

I tested manually that <Python.h> can be used with -Werror=declaration-after-statement.

@vstinner vstinner merged commit a3d2ce9 into python:3.11 May 16, 2022
@vstinner vstinner deleted the inlude_c90_311 branch May 16, 2022 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants