[C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type · Issue #83754 · 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.11only security fixes

bpo-39573: Use Py_REFCNT() macro #18388

bpo-39573: Add Py_SET_REFCNT() function #18389

bpo-39573: Use Py_TYPE() in abstract.c #18390

bpo-39573: Use Py_TYPE() macro in Python and Include directories #18391

bpo-39573: Use Py_TYPE() macro in Objects directory #18392

bpo-39573: Use Py_TYPE() macro in Modules directory #18393

bpo-39573: Add Py_SET_TYPE() function #18394

bpo-39573: Use Py_TYPE() macro in object.c #18398

bpo-39573: Add Py_SET_SIZE() function #18400

bpo-39573: Use Py_SET_SIZE() function #18402

bpo-39573: Use Py_TYPE() macro in ctypes.h #18411

bpo-39573: Use Py_SIZE() in s_set() of cfield.c #18419

bpo-39573: Add Py_IS_TYPE macro #18488

bpo-39573: Fix bad copy-paste in Py_SET_SIZE. #18496

bpo-39573: Update clinic to use Py_IS_TYPE macro #18507

bpo-39573: Update Include/* to use Py_IS_TYPE #18508

bpo-39573: Clean up modules and headers to use Py_IS_TYPE #18521

bpo-39573: Finish converting to new Py_IS_TYPE macro. #18601

bpo-39573: Use Py_IS_TYPE for type checking #18789

bpo-39573: Use Py_IS_TYPE for negative type checks #18798

bpo-39573: Make Py_IS_TYPE take const args. Add _PyObject_CAST_CONST. #18799

bpo-39873: PyObject_Init() uses PyObject_INIT() #18804

bpo-39573: Use Py_IS_TYPE to check for types #18809

bpo-39573: Use Py_IS_TYPE to check for types #19882

bpo-30459: Cast the result of PyList_SET_ITEM() to void #19975

bpo-39573: Convert Py_TYPE() to a static inline function #20290

bpo-39573: Fix buildbot failure for tupleobject.c #20391

bpo-39573: Convert Py_REFCNT and Py_SIZE to functions #20429

bpo-39573: Porting to Python 3.10: Py_SET_SIZE() macro #20610

[WIP, DO NOT MERGE] bpo-41188: Prepare CPython for opague PyObject structure. #21262