Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
01c6e6fb
Kaydet (Commit)
01c6e6fb
authored
Nis 18, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
many more types to initialize (I had to expose some of them)
üst
accb3d00
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
6 deletions
+52
-6
descrobject.h
Include/descrobject.h
+3
-0
sliceobject.h
Include/sliceobject.h
+1
-0
descrobject.c
Objects/descrobject.c
+4
-4
object.c
Objects/object.c
+43
-1
sliceobject.c
Objects/sliceobject.c
+1
-1
No files found.
Include/descrobject.h
Dosyayı görüntüle @
01c6e6fb
...
...
@@ -68,6 +68,9 @@ typedef struct {
}
PyWrapperDescrObject
;
PyAPI_DATA
(
PyTypeObject
)
PyWrapperDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyDictProxy_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyGetSetDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyMemberDescr_Type
;
PyAPI_FUNC
(
PyObject
*
)
PyDescr_NewMethod
(
PyTypeObject
*
,
PyMethodDef
*
);
PyAPI_FUNC
(
PyObject
*
)
PyDescr_NewClassMethod
(
PyTypeObject
*
,
PyMethodDef
*
);
...
...
Include/sliceobject.h
Dosyayı görüntüle @
01c6e6fb
...
...
@@ -25,6 +25,7 @@ typedef struct {
}
PySliceObject
;
PyAPI_DATA
(
PyTypeObject
)
PySlice_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyEllipsis_Type
;
#define PySlice_Check(op) (Py_TYPE(op) == &PySlice_Type)
...
...
Objects/descrobject.c
Dosyayı görüntüle @
01c6e6fb
...
...
@@ -456,7 +456,7 @@ static PyTypeObject PyClassMethodDescr_Type = {
0
,
/* tp_descr_set */
};
static
PyTypeObject
PyMemberDescr_Type
=
{
PyTypeObject
PyMemberDescr_Type
=
{
PyVarObject_HEAD_INIT
(
&
PyType_Type
,
0
)
"member_descriptor"
,
sizeof
(
PyMemberDescrObject
),
...
...
@@ -493,7 +493,7 @@ static PyTypeObject PyMemberDescr_Type = {
(
descrsetfunc
)
member_set
,
/* tp_descr_set */
};
static
PyTypeObject
PyGetSetDescr_Type
=
{
PyTypeObject
PyGetSetDescr_Type
=
{
PyVarObject_HEAD_INIT
(
&
PyType_Type
,
0
)
"getset_descriptor"
,
sizeof
(
PyGetSetDescrObject
),
...
...
@@ -819,7 +819,7 @@ proxy_richcompare(proxyobject *v, PyObject *w, int op)
return
PyObject_RichCompare
(
v
->
dict
,
w
,
op
);
}
static
PyTypeObject
proxyt
ype
=
{
PyTypeObject
PyDictProxy_T
ype
=
{
PyVarObject_HEAD_INIT
(
&
PyType_Type
,
0
)
"dictproxy"
,
/* tp_name */
sizeof
(
proxyobject
),
/* tp_basicsize */
...
...
@@ -862,7 +862,7 @@ PyDictProxy_New(PyObject *dict)
{
proxyobject
*
pp
;
pp
=
PyObject_GC_New
(
proxyobject
,
&
proxyt
ype
);
pp
=
PyObject_GC_New
(
proxyobject
,
&
PyDictProxy_T
ype
);
if
(
pp
!=
NULL
)
{
Py_INCREF
(
dict
);
pp
->
dict
=
dict
;
...
...
Objects/object.c
Dosyayı görüntüle @
01c6e6fb
...
...
@@ -2,6 +2,7 @@
/* Generic object operations; and implementation of None (NoObject) */
#include "Python.h"
#include "frameobject.h"
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -2083,8 +2084,10 @@ _Py_ReadyTypes(void)
if
(
PyType_Ready
(
&
PyStaticMethod_Type
)
<
0
)
Py_FatalError
(
"Can't initialize static method type"
);
#ifndef WITHOUT_COMPLEX
if
(
PyType_Ready
(
&
PyComplex_Type
)
<
0
)
Py_FatalError
(
"Can't initalize complex type"
);
Py_FatalError
(
"Can't initialize complex type"
);
#endif
if
(
PyType_Ready
(
&
PyFloat_Type
)
<
0
)
Py_FatalError
(
"Can't initialize float type"
);
...
...
@@ -2115,6 +2118,45 @@ _Py_ReadyTypes(void)
if
(
PyType_Ready
(
&
PyReversed_Type
)
<
0
)
Py_FatalError
(
"Can't initialize reversed type"
);
if
(
PyType_Ready
(
&
PyCode_Type
)
<
0
)
Py_FatalError
(
"Can't initialize code type"
);
if
(
PyType_Ready
(
&
PyFrame_Type
)
<
0
)
Py_FatalError
(
"Can't initialize frame type"
);
if
(
PyType_Ready
(
&
PyCFunction_Type
)
<
0
)
Py_FatalError
(
"Can't initialize builtin function type"
);
if
(
PyType_Ready
(
&
PyMethod_Type
)
<
0
)
Py_FatalError
(
"Can't initialize method type"
);
if
(
PyType_Ready
(
&
PyFunction_Type
)
<
0
)
Py_FatalError
(
"Can't initialize function type"
);
if
(
PyType_Ready
(
&
PyClass_Type
)
<
0
)
Py_FatalError
(
"Can't initialize class type"
);
if
(
PyType_Ready
(
&
PyDictProxy_Type
)
<
0
)
Py_FatalError
(
"Can't initialize dict proxy type"
);
if
(
PyType_Ready
(
&
PyGen_Type
)
<
0
)
Py_FatalError
(
"Can't initialize generator type"
);
if
(
PyType_Ready
(
&
PyGetSetDescr_Type
)
<
0
)
Py_FatalError
(
"Can't initialize get-set descriptor type"
);
if
(
PyType_Ready
(
&
PyWrapperDescr_Type
)
<
0
)
Py_FatalError
(
"Can't initialize wrapper type"
);
if
(
PyType_Ready
(
&
PyInstance_Type
)
<
0
)
Py_FatalError
(
"Can't initialize instance type"
);
if
(
PyType_Ready
(
&
PyEllipsis_Type
)
<
0
)
Py_FatalError
(
"Can't initialize ellipsis type"
);
if
(
PyType_Ready
(
&
PyMemberDescr_Type
)
<
0
)
Py_FatalError
(
"Can't initialize member descriptor type"
);
}
...
...
Objects/sliceobject.c
Dosyayı görüntüle @
01c6e6fb
...
...
@@ -22,7 +22,7 @@ ellipsis_repr(PyObject *op)
return
PyString_FromString
(
"Ellipsis"
);
}
static
PyTypeObject
PyEllipsis_Type
=
{
PyTypeObject
PyEllipsis_Type
=
{
PyVarObject_HEAD_INIT
(
&
PyType_Type
,
0
)
"ellipsis"
,
/* tp_name */
0
,
/* tp_basicsize */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment