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
e45b7c09
Kaydet (Commit)
e45b7c09
authored
Eki 07, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #18287: PyType_Ready() now checks that tp_name is not NULL.
Original patch by Niklas Koep.
üst
242c170f
de0574bd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
2 deletions
+15
-2
typeobj.rst
Doc/c-api/typeobj.rst
+2
-1
newtypes.rst
Doc/extending/newtypes.rst
+3
-1
ACKS
Misc/ACKS
+1
-0
NEWS
Misc/NEWS
+3
-0
typeobject.c
Objects/typeobject.c
+6
-0
No files found.
Doc/c-api/typeobj.rst
Dosyayı görüntüle @
e45b7c09
...
@@ -116,7 +116,8 @@ type objects) *must* have the :attr:`ob_size` field.
...
@@ -116,7 +116,8 @@ type objects) *must* have the :attr:`ob_size` field.
If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is made accessible as the
If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is made accessible as the
:attr:`~definition.__name__` attribute, and the :attr:`__module__` attribute is undefined
:attr:`~definition.__name__` attribute, and the :attr:`__module__` attribute is undefined
(unless explicitly set in the dictionary, as explained above). This means your
(unless explicitly set in the dictionary, as explained above). This means your
type will be impossible to pickle.
type will be impossible to pickle. Additionally, it will not be listed in
module documentations created with pydoc.
This field is not inherited by subtypes.
This field is not inherited by subtypes.
...
...
Doc/extending/newtypes.rst
Dosyayı görüntüle @
e45b7c09
...
@@ -129,7 +129,9 @@ our objects and in some error messages, for example::
...
@@ -129,7 +129,9 @@ our objects and in some error messages, for example::
Note that the name is a dotted name that includes both the module name and the
Note that the name is a dotted name that includes both the module name and the
name of the type within the module. The module in this case is :mod:`noddy` and
name of the type within the module. The module in this case is :mod:`noddy` and
the type is :class:`Noddy`, so we set the type name to :class:`noddy.Noddy`. ::
the type is :class:`Noddy`, so we set the type name to :class:`noddy.Noddy`.
One side effect of using an undotted name is that the pydoc documentation tool
will not list the new type in the module documentation. ::
sizeof(noddy_NoddyObject), /* tp_basicsize */
sizeof(noddy_NoddyObject), /* tp_basicsize */
...
...
Misc/ACKS
Dosyayı görüntüle @
e45b7c09
...
@@ -783,6 +783,7 @@ Jeff Knupp
...
@@ -783,6 +783,7 @@ Jeff Knupp
Kubilay Kocak
Kubilay Kocak
Greg Kochanski
Greg Kochanski
Manvisha Kodali
Manvisha Kodali
Niklas Koep
Damon Kohler
Damon Kohler
Marko Kohtala
Marko Kohtala
Vajrasky Kok
Vajrasky Kok
...
...
Misc/NEWS
Dosyayı görüntüle @
e45b7c09
...
@@ -10,6 +10,9 @@ What's New in Python 3.6.0 beta 2
...
@@ -10,6 +10,9 @@ What's New in Python 3.6.0 beta 2
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #18287: PyType_Ready() now checks that tp_name is not NULL.
Original patch by Niklas Koep.
- Issue #24098: Fixed possible crash when AST is changed in process of
- Issue #24098: Fixed possible crash when AST is changed in process of
compiling it.
compiling it.
...
...
Objects/typeobject.c
Dosyayı görüntüle @
e45b7c09
...
@@ -4893,6 +4893,12 @@ PyType_Ready(PyTypeObject *type)
...
@@ -4893,6 +4893,12 @@ PyType_Ready(PyTypeObject *type)
_Py_AddToAllObjects
((
PyObject
*
)
type
,
0
);
_Py_AddToAllObjects
((
PyObject
*
)
type
,
0
);
#endif
#endif
if
(
type
->
tp_name
==
NULL
)
{
PyErr_Format
(
PyExc_SystemError
,
"Type does not define the tp_name field."
);
goto
error
;
}
/* Initialize tp_base (defaults to BaseObject unless that's us) */
/* Initialize tp_base (defaults to BaseObject unless that's us) */
base
=
type
->
tp_base
;
base
=
type
->
tp_base
;
if
(
base
==
NULL
&&
type
!=
&
PyBaseObject_Type
)
{
if
(
base
==
NULL
&&
type
!=
&
PyBaseObject_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