]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-106869: Use new PyMemberDef constant names (#106871)
authorVictor Stinner <vstinner@python.org>
Tue, 25 Jul 2023 13:28:30 +0000 (15:28 +0200)
committerGitHub <noreply@github.com>
Tue, 25 Jul 2023 13:28:30 +0000 (15:28 +0200)
commit1a3faba9f15e0c03c6cc0d225d377b8910b5379f
tree0aebe4139933835899fd5f618c023bceb9de0389
parented082383272c2c238e364e9cc83229234aee23cc
gh-106869: Use new PyMemberDef constant names (#106871)

* Remove '#include "structmember.h"'.
* If needed, add <stddef.h> to get offsetof() function.
* Update Parser/asdl_c.py to regenerate Python/Python-ast.c.
* Replace:

  * T_SHORT => Py_T_SHORT
  * T_INT => Py_T_INT
  * T_LONG => Py_T_LONG
  * T_FLOAT => Py_T_FLOAT
  * T_DOUBLE => Py_T_DOUBLE
  * T_STRING => Py_T_STRING
  * T_OBJECT => _Py_T_OBJECT
  * T_CHAR => Py_T_CHAR
  * T_BYTE => Py_T_BYTE
  * T_UBYTE => Py_T_UBYTE
  * T_USHORT => Py_T_USHORT
  * T_UINT => Py_T_UINT
  * T_ULONG => Py_T_ULONG
  * T_STRING_INPLACE => Py_T_STRING_INPLACE
  * T_BOOL => Py_T_BOOL
  * T_OBJECT_EX => Py_T_OBJECT_EX
  * T_LONGLONG => Py_T_LONGLONG
  * T_ULONGLONG => Py_T_ULONGLONG
  * T_PYSSIZET => Py_T_PYSSIZET
  * T_NONE => _Py_T_NONE
  * READONLY => Py_READONLY
  * PY_AUDIT_READ => Py_AUDIT_READ
  * READ_RESTRICTED => Py_AUDIT_READ
  * PY_WRITE_RESTRICTED => _Py_WRITE_RESTRICTED
  * RESTRICTED => (READ_RESTRICTED | _Py_WRITE_RESTRICTED)
78 files changed:
Include/internal/pycore_frame.h
Modules/_asynciomodule.c
Modules/_bz2module.c
Modules/_collectionsmodule.c
Modules/_csv.c
Modules/_ctypes/_ctypes.c
Modules/_ctypes/callproc.c
Modules/_datetimemodule.c
Modules/_elementtree.c
Modules/_functoolsmodule.c
Modules/_io/bufferedio.c
Modules/_io/bytesio.c
Modules/_io/fileio.c
Modules/_io/iobase.c
Modules/_io/stringio.c
Modules/_io/textio.c
Modules/_io/winconsoleio.c
Modules/_json.c
Modules/_lzmamodule.c
Modules/_multiprocessing/semaphore.c
Modules/_operator.c
Modules/_pickle.c
Modules/_queuemodule.c
Modules/_sqlite/blob.c
Modules/_sqlite/connection.c
Modules/_sqlite/cursor.c
Modules/_sre/sre.c
Modules/_struct.c
Modules/_testcapi/buffer.c
Modules/_testcapi/heaptype.c
Modules/_testcapi/vectorcall.c
Modules/_testcapi/vectorcall_limited.c
Modules/_testcapimodule.c
Modules/_threadmodule.c
Modules/_winapi.c
Modules/_zoneinfo.c
Modules/arraymodule.c
Modules/cjkcodecs/multibytecodec.c
Modules/itertoolsmodule.c
Modules/mmapmodule.c
Modules/overlapped.c
Modules/posixmodule.c
Modules/pyexpat.c
Modules/selectmodule.c
Modules/sha2module.c
Modules/socketmodule.c
Modules/unicodedata.c
Modules/xxsubtype.c
Modules/zlibmodule.c
Objects/classobject.c
Objects/codeobject.c
Objects/complexobject.c
Objects/descrobject.c
Objects/exceptions.c
Objects/frameobject.c
Objects/funcobject.c
Objects/genericaliasobject.c
Objects/genobject.c
Objects/methodobject.c
Objects/moduleobject.c
Objects/namespaceobject.c
Objects/rangeobject.c
Objects/sliceobject.c
Objects/structseq.c
Objects/typeobject.c
Objects/typevarobject.c
Objects/unionobject.c
Objects/weakrefobject.c
PC/winreg.c
Parser/asdl_c.py
Python/Python-ast.c
Python/bytecodes.c
Python/ceval.c
Python/context.c
Python/specialize.c
Python/structmember.c
Python/symtable.c
Python/traceback.c