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
e09bcc87
Kaydet (Commit)
e09bcc87
authored
Ock 28, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #22079: PyType_Ready() now checks that statically allocated type has
no dynamically allocated bases.
üst
db071640
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
NEWS
Misc/NEWS
+7
-0
typeobject.c
Objects/typeobject.c
+14
-0
No files found.
Misc/NEWS
Dosyayı görüntüle @
e09bcc87
...
@@ -332,6 +332,12 @@ Build
...
@@ -332,6 +332,12 @@ Build
- Issue #17128: Use private version of OpenSSL for 2.7.9 OS X 10.5+ installer.
- Issue #17128: Use private version of OpenSSL for 2.7.9 OS X 10.5+ installer.
C API
-----
- Issue #22079: PyType_Ready() now checks that statically allocated type has
no dynamically allocated bases.
Documentation
Documentation
-------------
-------------
...
@@ -1136,6 +1142,7 @@ Build
...
@@ -1136,6 +1142,7 @@ Build
C API
C API
-----
-----
- Issue #20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to
- Issue #20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to
match what importlib does; this affects _frozen_importlib as well as any
match what importlib does; this affects _frozen_importlib as well as any
module loaded using imp.init_frozen().
module loaded using imp.init_frozen().
...
...
Objects/typeobject.c
Dosyayı görüntüle @
e09bcc87
...
@@ -4680,6 +4680,20 @@ PyType_Ready(PyTypeObject *type)
...
@@ -4680,6 +4680,20 @@ PyType_Ready(PyTypeObject *type)
inherit_slots
(
type
,
(
PyTypeObject
*
)
b
);
inherit_slots
(
type
,
(
PyTypeObject
*
)
b
);
}
}
/* All bases of statically allocated type should be statically allocated */
if
(
!
(
type
->
tp_flags
&
Py_TPFLAGS_HEAPTYPE
))
for
(
i
=
0
;
i
<
n
;
i
++
)
{
PyObject
*
b
=
PyTuple_GET_ITEM
(
bases
,
i
);
if
(
PyType_Check
(
b
)
&&
(((
PyTypeObject
*
)
b
)
->
tp_flags
&
Py_TPFLAGS_HEAPTYPE
))
{
PyErr_Format
(
PyExc_TypeError
,
"type '%.100s' is not dynamically allocated but "
"its base type '%.100s' is dynamically allocated"
,
type
->
tp_name
,
((
PyTypeObject
*
)
b
)
->
tp_name
);
goto
error
;
}
}
/* Sanity check for tp_free. */
/* Sanity check for tp_free. */
if
(
PyType_IS_GC
(
type
)
&&
(
type
->
tp_flags
&
Py_TPFLAGS_BASETYPE
)
&&
if
(
PyType_IS_GC
(
type
)
&&
(
type
->
tp_flags
&
Py_TPFLAGS_BASETYPE
)
&&
(
type
->
tp_free
==
NULL
||
type
->
tp_free
==
PyObject_Del
))
{
(
type
->
tp_free
==
NULL
||
type
->
tp_free
==
PyObject_Del
))
{
...
...
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