Skip to content
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

bpo-43795: PEP-652: Simplify headers for easier static analysis #25483

Merged
merged 2 commits into from
Apr 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion Include/boolobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ PyAPI_DATA(PyTypeObject) PyBool_Type;
Don't forget to apply Py_INCREF() when returning either!!! */

/* Don't use these directly */
PyAPI_DATA(struct _longobject) _Py_FalseStruct, _Py_TrueStruct;
PyAPI_DATA(struct _longobject) _Py_FalseStruct;
PyAPI_DATA(struct _longobject) _Py_TrueStruct;

/* Use these macros */
#define Py_False ((PyObject *) &_Py_FalseStruct)
Expand Down
2 changes: 2 additions & 0 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
PyAPI_FUNC(void) _Py_NO_RETURN PyThread_exit_thread(void);

XLC support is intentionally omitted due to bpo-40244 */
#ifndef _Py_NO_RETURN
#if defined(__clang__) || \
(defined(__GNUC__) && \
((__GNUC__ >= 3) || \
Expand All @@ -871,6 +872,7 @@ extern _invalid_parameter_handler _Py_silent_invalid_parameter_handler;
#else
# define _Py_NO_RETURN
#endif
#endif


// Preprocessor check for a builtin preprocessor function. Always return 0
Expand Down