8000 gh-87347: Add parenthesis around macro arguments by vstinner · Pull Request #93915 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-87347: Add parenthesis around macro arguments #93915

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 6 commits into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 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
Prev Previous commit
Next Next commit
Revert invalid changes
  • Loading branch information
vstinner committed Jun 16, 2022
commit f4dc85959bfae8e78877091f11e9f2f75a37a333
4 changes: 2 additions & 2 deletions Include/internal/pycore_global_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ extern "C" {
// All others must be per-interpreter.

#define _Py_GLOBAL_OBJECT(NAME) \
_PyRuntime.global_objects.(NAME)
_PyRuntime.global_objects.NAME
#define _Py_SINGLETON(NAME) \
_Py_GLOBAL_OBJECT(singletons.(NAME))
_Py_GLOBAL_OBJECT(singletons.NAME)

struct _Py_global_objects {
struct {
Expand Down
4 changes: 2 additions & 2 deletions Include/pymem.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ PyAPI_FUNC(void) PyMem_Free(void *ptr);
// PyMem_Del and PyMem_DEL are defined with no parameter to be able to use
// them as function pointers (ex: dealloc = PyMem_Del).
#define PyMem_MALLOC(n) PyMem_Malloc((n))
#define PyMem_NEW(type, n) PyMem_New((type), (n))
#define PyMem_NEW(type, n) PyMem_New(type, (n))
#define PyMem_REALLOC(p, n) PyMem_Realloc((p), (n))
#define PyMem_RESIZE(p, type, n) PyMem_Resize((p), (type), (n))
#define PyMem_RESIZE(p, type, n) PyMem_Resize((p), type, (n))
#define PyMem_FREE(p) PyMem_Free((p))
#define PyMem_Del(p) PyMem_Free((p))
#define PyMem_DEL(p) PyMem_Free((p))
Expand Down
0