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
eff61f69
Kaydet (Commit)
eff61f69
authored
Eyl 01, 2011
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make sure to initialize the method wrapper type
üst
a7622858
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
descrobject.h
Include/descrobject.h
+1
-0
descrobject.c
Objects/descrobject.c
+3
-6
object.c
Objects/object.c
+3
-0
No files found.
Include/descrobject.h
Dosyayı görüntüle @
eff61f69
...
...
@@ -77,6 +77,7 @@ PyAPI_DATA(PyTypeObject) PyMemberDescr_Type;
PyAPI_DATA
(
PyTypeObject
)
PyMethodDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyWrapperDescr_Type
;
PyAPI_DATA
(
PyTypeObject
)
PyDictProxy_Type
;
PyAPI_DATA
(
PyTypeObject
)
_PyMethodWrapper_Type
;
PyAPI_FUNC
(
PyObject
*
)
PyDescr_NewMethod
(
PyTypeObject
*
,
PyMethodDef
*
);
PyAPI_FUNC
(
PyObject
*
)
PyDescr_NewClassMethod
(
PyTypeObject
*
,
PyMethodDef
*
);
...
...
Objects/descrobject.c
Dosyayı görüntüle @
eff61f69
...
...
@@ -846,16 +846,13 @@ PyDictProxy_New(PyObject *dict)
/* This has no reason to be in this file except that adding new files is a
bit of a pain */
/* forward */
static
PyTypeObject
wrappertype
;
typedef
struct
{
PyObject_HEAD
PyWrapperDescrObject
*
descr
;
PyObject
*
self
;
}
wrapperobject
;
#define Wrapper_Check(v) (Py_TYPE(v) == &
wrappert
ype)
#define Wrapper_Check(v) (Py_TYPE(v) == &
_PyMethodWrapper_T
ype)
static
void
wrapper_dealloc
(
wrapperobject
*
wp
)
...
...
@@ -1021,7 +1018,7 @@ wrapper_traverse(PyObject *self, visitproc visit, void *arg)
return
0
;
}
static
PyTypeObject
wrappert
ype
=
{
PyTypeObject
_PyMethodWrapper_T
ype
=
{
PyVarObject_HEAD_INIT
(
&
PyType_Type
,
0
)
"method-wrapper"
,
/* tp_name */
sizeof
(
wrapperobject
),
/* tp_basicsize */
...
...
@@ -1070,7 +1067,7 @@ PyWrapper_New(PyObject *d, PyObject *self)
assert
(
_PyObject_RealIsSubclass
((
PyObject
*
)
Py_TYPE
(
self
),
(
PyObject
*
)
PyDescr_TYPE
(
descr
)));
wp
=
PyObject_GC_New
(
wrapperobject
,
&
wrappert
ype
);
wp
=
PyObject_GC_New
(
wrapperobject
,
&
_PyMethodWrapper_T
ype
);
if
(
wp
!=
NULL
)
{
Py_INCREF
(
descr
);
wp
->
descr
=
descr
;
...
...
Objects/object.c
Dosyayı görüntüle @
eff61f69
...
...
@@ -1625,6 +1625,9 @@ _Py_ReadyTypes(void)
if
(
PyType_Ready
(
&
PyWrapperDescr_Type
)
<
0
)
Py_FatalError
(
"Can't initialize wrapper type"
);
if
(
PyType_Ready
(
&
_PyMethodWrapper_Type
)
<
0
)
Py_FatalError
(
"Can't initialize method wrapper type"
);
if
(
PyType_Ready
(
&
PyEllipsis_Type
)
<
0
)
Py_FatalError
(
"Can't initialize ellipsis type"
);
...
...
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