Tin mới
GitHub CopilotWrite better code with AI
GitHub Copilot appDirect agents from issue to merge
CodespacesInstant dev environments
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
GitHub SponsorsFund open source developers
Copilot for BusinessEnterprise-grade AI features
Premium SupportEnterprise-grade 24/7 support
: Porting to Python 3.10: Py_SET_SIZE() macro
Build broken on Python 3.10 MagicStack/immutables#46
Learn more about hiding disruptive comments
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, that code come from @eric-wieser via numpy/numpy#16417 (comment)
MAINT: make Py_SET_SIZE and Py_SET_TYPE macros a bit safer numpy/numpy#16501
In the meanwhile, I created the backport compatiblity header file :-) It defines a static inline function which returns void: https://github.com/pythoncapi/pythoncapi_compat/blob/219cdd858595fb5d478117b0ef4758fedc3d2365/
use Py_SET_TYPE for compat with python 3.10 psycopg/psycopg2#1131