junyixie <xie.ju...@outlook.com> added the comment:

Include/internal/pycore_structseq.h:
   10  
   11  
   12: PyAPI_FUNC(int) _PyStructSequence_InitType(
   13      PyTypeObject *type,
   14      PyStructSequence_Desc *desc,

Modules/_cursesmodule.c:
 4794      /* ncurses_version */
 4795      if (NcursesVersionType.tp_name == NULL) {
 4796:         if (_PyStructSequence_InitType(&NcursesVersionType,
 4797                                         &ncurses_version_desc,
 4798                                         
Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) {

Objects/structseq.c:
  463  
  464  int
  465: _PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc 
*desc,
  466                             unsigned long tp_flags)
  467  {
  ...
  527  PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc 
*desc)
  528  {
  529:     return _PyStructSequence_InitType(type, desc, 0);
  530  }
  531  

Python/sysmodule.c:
 2813      /* version_info */
 2814      if (VersionInfoType.tp_name == NULL) {
 2815:         if (_PyStructSequence_InitType(&VersionInfoType,
 2816                                         &version_info_desc,
 2817                                         
Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) {
 ....
 2827      // sys.flags: updated in-place later by _PySys_UpdateConfig()
 2828      if (FlagsType.tp_name == 0) {
 2829:         if (_PyStructSequence_InitType(&FlagsType, &flags_desc,
 2830                                         
Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) {
 2831              goto type_init_failed;
 ....
 2837      /* getwindowsversion */
 2838      if (WindowsVersionType.tp_name == 0) {
 2839:         if (_PyStructSequence_InitType(&WindowsVersionType,
 2840                                         &windows_version_desc,
 2841                                         
Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) {

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44532>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to