bpo-30459: Cast the result of PyList_SET_ITEM() to void by ZackerySpytz · Pull Request #19975 · python/cpython · GitHub

github.com

Tin mới

ZackerySpytz:bpo-30459-PyList_SET_ITEM

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

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

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/vstinner/misc/blob/master/cpython/pep-opaque-c-api.rst

By the way, I added Py_SET_REFCNT(), Py_SET_TYPE() and Py_SET_SIZE() in Python 3.9, but I left the related Py_REFCNT(), Py_TYPE() and Py_SIZE() unchanged. It remains possible to use them as l-value for example: Py_REFCNT

bpo-30459: Convert PyTuple_SET_ITEM() to a function #23645

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

[BUG] listobject.h:33:36: error: void value not ignored as it ought to be cython/cython#4873

listobject.h:33:36: error: void value not ignored as it ought to be #94507

[C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type #83754