Skip to content

Commit 9295187

Browse files
committed
Merged revisions 71757 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r71757 | benjamin.peterson | 2009-04-19 21:09:13 -0500 (Sun, 19 Apr 2009) | 17 lines Merged revisions 71734,71738-71739 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r71734 | benjamin.peterson | 2009-04-18 17:15:26 -0500 (Sat, 18 Apr 2009) | 1 line many more types to initialize (I had to expose some of them) ........ r71738 | benjamin.peterson | 2009-04-18 21:32:42 -0500 (Sat, 18 Apr 2009) | 1 line initialize weakref some weakref types ........ r71739 | benjamin.peterson | 2009-04-18 21:40:43 -0500 (Sat, 18 Apr 2009) | 1 line make errors consistent ........ ................
1 parent 978207f commit 9295187

4 files changed

Lines changed: 48 additions & 7 deletions

File tree

Include/descrobject.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ PyAPI_DATA(PyTypeObject) PyMemberDescr_Type;
7373
PyAPI_DATA(PyTypeObject) PyMethodDescr_Type;
7474
PyAPI_DATA(PyTypeObject) PyWrapperDescr_Type;
7575
PyAPI_DATA(PyTypeObject) PyDictProxy_Type;
76+
PyAPI_DATA(PyTypeObject) PyGetSetDescr_Type;
77+
PyAPI_DATA(PyTypeObject) PyMemberDescr_Type;
7678

7779
PyAPI_FUNC(PyObject *) PyDescr_NewMethod(PyTypeObject *, PyMethodDef *);
7880
PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *);

Include/sliceobject.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ typedef struct {
2525
} PySliceObject;
2626

2727
PyAPI_DATA(PyTypeObject) PySlice_Type;
28+
PyAPI_DATA(PyTypeObject) PyEllipsis_Type;
2829

2930
#define PySlice_Check(op) (Py_TYPE(op) == &PySlice_Type)
3031

Objects/object.c

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include "Python.h"
55
#include "sliceobject.h" /* For PyEllipsis_Type */
6+
#include "frameobject.h"
67

78
#ifdef __cplusplus
89
extern "C" {
@@ -1467,17 +1468,23 @@ _Py_ReadyTypes(void)
14671468
if (PyType_Ready(&_PyWeakref_RefType) < 0)
14681469
Py_FatalError("Can't initialize weakref type");
14691470

1471+
if (PyType_Ready(&_PyWeakref_CallableProxyType) < 0)
1472+
Py_FatalError("Can't initialize callable weakref proxy type");
1473+
1474+
if (PyType_Ready(&_PyWeakref_ProxyType) < 0)
1475+
Py_FatalError("Can't initialize weakref proxy type");
1476+
14701477
if (PyType_Ready(&PyBool_Type) < 0)
14711478
Py_FatalError("Can't initialize bool type");
14721479

14731480
if (PyType_Ready(&PyByteArray_Type) < 0)
1474-
Py_FatalError("Can't initialize bytearray");
1481+
Py_FatalError("Can't initialize bytearray type");
14751482

14761483
if (PyType_Ready(&PyBytes_Type) < 0)
14771484
Py_FatalError("Can't initialize 'str'");
14781485

14791486
if (PyType_Ready(&PyList_Type) < 0)
1480-
Py_FatalError("Can't initialize list");
1487+
Py_FatalError("Can't initialize list type");
14811488

14821489
if (PyType_Ready(&PyNone_Type) < 0)
14831490
Py_FatalError("Can't initialize None type");
@@ -1515,9 +1522,10 @@ _Py_ReadyTypes(void)
15151522
if (PyType_Ready(&PyStaticMethod_Type) < 0)
15161523
Py_FatalError("Can't initialize static method type");
15171524

1525+
#ifndef WITHOUT_COMPLEX
15181526
if (PyType_Ready(&PyComplex_Type) < 0)
15191527
Py_FatalError("Can't initialize complex type");
1520-
1528+
#endif
15211529
if (PyType_Ready(&PyFloat_Type) < 0)
15221530
Py_FatalError("Can't initialize float type");
15231531

@@ -1542,11 +1550,41 @@ _Py_ReadyTypes(void)
15421550
if (PyType_Ready(&PyReversed_Type) < 0)
15431551
Py_FatalError("Can't initialize reversed type");
15441552

1545-
if (PyType_Ready(&PyCode_Type) < 0)
1546-
Py_FatalError("Can't initialize 'code'");
1547-
15481553
if (PyType_Ready(&PyStdPrinter_Type) < 0)
15491554
Py_FatalError("Can't initialize StdPrinter");
1555+
1556+
if (PyType_Ready(&PyCode_Type) < 0)
1557+
Py_FatalError("Can't initialize code type");
1558+
1559+
if (PyType_Ready(&PyFrame_Type) < 0)
1560+
Py_FatalError("Can't initialize frame type");
1561+
1562+
if (PyType_Ready(&PyCFunction_Type) < 0)
1563+
Py_FatalError("Can't initialize builtin function type");
1564+
1565+
if (PyType_Ready(&PyMethod_Type) < 0)
1566+
Py_FatalError("Can't initialize method type");
1567+
1568+
if (PyType_Ready(&PyFunction_Type) < 0)
1569+
Py_FatalError("Can't initialize function type");
1570+
1571+
if (PyType_Ready(&PyDictProxy_Type) < 0)
1572+
Py_FatalError("Can't initialize dict proxy type");
1573+
1574+
if (PyType_Ready(&PyGen_Type) < 0)
1575+
Py_FatalError("Can't initialize generator type");
1576+
1577+
if (PyType_Ready(&PyGetSetDescr_Type) < 0)
1578+
Py_FatalError("Can't initialize get-set descriptor type");
1579+
1580+
if (PyType_Ready(&PyWrapperDescr_Type) < 0)
1581+
Py_FatalError("Can't initialize wrapper type");
1582+
1583+
if (PyType_Ready(&PyEllipsis_Type) < 0)
1584+
Py_FatalError("Can't initialize ellipsis type");
1585+
1586+
if (PyType_Ready(&PyMemberDescr_Type) < 0)
1587+
Py_FatalError("Can't initialize member descriptor type");
15501588
}
15511589

15521590

Objects/sliceobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ellipsis_repr(PyObject *op)
2222
return PyUnicode_FromString("Ellipsis");
2323
}
2424

25-
static PyTypeObject PyEllipsis_Type = {
25+
PyTypeObject PyEllipsis_Type = {
2626
PyVarObject_HEAD_INIT(&PyType_Type, 0)
2727
"ellipsis", /* tp_name */
2828
0, /* tp_basicsize */

0 commit comments

Comments
 (0)