object.h uses an anonymous union in a struct (older C incompatible) · Issue #105059 · python/cpython · GitHub

github.com

Tin mới

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

3.12only security fixes

3.13bugs and security fixes

https://github.com/python/cpython/blame/1668b41dc477bc9562e4c50ab36a232839b4621b/Include/object.h#L168-L173

An anonymous union was added recently, making this header produce warnings/errors for C++ compilers that have not enabled the relevant extensions/standards.

gh-105059: Remove anonymous union from PyObject #105275

[DRAFT] gh-105059: In C++, Py_INCREF() uses a function call #105764

[DRAFT] gh-105059: C99 avoids PyObject.ob_refcnt union #105767

gh-105059: Use GCC/clang extension for PyObject union #107232

[3.12] gh-105059: Use GCC/clang extension for PyObject union (GH-107232) #107236

gh-105059: Fix MSCV compiler warning on PyObject union #107239

[3.12] gh-105059: Fix MSCV compiler warning on PyObject union (GH-107239) #107248

Release and Deferred blockers 🚫