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
c255c7be
Kaydet (Commit)
c255c7be
authored
Şub 20, 2006
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1086854: Rename PyHeapType members adding ht_ prefix.
üst
32cbc961
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
object.h
Include/object.h
+3
-3
typeobject.c
Objects/typeobject.c
+9
-9
No files found.
Include/object.h
Dosyayı görüntüle @
c255c7be
...
...
@@ -345,7 +345,7 @@ typedef struct _typeobject {
typedef
struct
_heaptypeobject
{
/* Note: there's a dependency on the order of these members
in slotptr() in typeobject.c . */
PyTypeObject
type
;
PyTypeObject
ht_
type
;
PyNumberMethods
as_number
;
PyMappingMethods
as_mapping
;
PySequenceMethods
as_sequence
;
/* as_sequence comes after as_mapping,
...
...
@@ -354,13 +354,13 @@ typedef struct _heaptypeobject {
a given operator (e.g. __getitem__).
see add_operators() in typeobject.c . */
PyBufferProcs
as_buffer
;
PyObject
*
name
,
*
slots
;
PyObject
*
ht_name
,
*
ht_
slots
;
/* here are optional user slots, followed by the members. */
}
PyHeapTypeObject
;
/* access macro to the members which are floating "behind" the object */
#define PyHeapType_GET_MEMBERS(etype) \
((PyMemberDef *)(((char *)etype) + (etype)->type.ob_type->tp_basicsize))
((PyMemberDef *)(((char *)etype) + (etype)->
ht_
type.ob_type->tp_basicsize))
/* Generic type check */
...
...
Objects/typeobject.c
Dosyayı görüntüle @
c255c7be
...
...
@@ -26,8 +26,8 @@ type_name(PyTypeObject *type, void *context)
if
(
type
->
tp_flags
&
Py_TPFLAGS_HEAPTYPE
)
{
PyHeapTypeObject
*
et
=
(
PyHeapTypeObject
*
)
type
;
Py_INCREF
(
et
->
name
);
return
et
->
name
;
Py_INCREF
(
et
->
ht_
name
);
return
et
->
ht_
name
;
}
else
{
s
=
strrchr
(
type
->
tp_name
,
'.'
);
...
...
@@ -71,8 +71,8 @@ type_set_name(PyTypeObject *type, PyObject *value, void *context)
Py_INCREF
(
value
);
Py_DECREF
(
et
->
name
);
et
->
name
=
value
;
Py_DECREF
(
et
->
ht_
name
);
et
->
ht_
name
=
value
;
type
->
tp_name
=
PyString_AS_STRING
(
value
);
...
...
@@ -1838,8 +1838,8 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
/* Keep name and slots alive in the extended type object */
et
=
(
PyHeapTypeObject
*
)
type
;
Py_INCREF
(
name
);
et
->
name
=
name
;
et
->
slots
=
slots
;
et
->
ht_
name
=
name
;
et
->
ht_
slots
=
slots
;
/* Initialize tp_flags */
type
->
tp_flags
=
Py_TPFLAGS_DEFAULT
|
Py_TPFLAGS_HEAPTYPE
|
...
...
@@ -2147,8 +2147,8 @@ type_dealloc(PyTypeObject *type)
* of most other objects. It's okay to cast it to char *.
*/
PyObject_Free
((
char
*
)
type
->
tp_doc
);
Py_XDECREF
(
et
->
name
);
Py_XDECREF
(
et
->
slots
);
Py_XDECREF
(
et
->
ht_
name
);
Py_XDECREF
(
et
->
ht_
slots
);
type
->
ob_type
->
tp_free
((
PyObject
*
)
type
);
}
...
...
@@ -2215,7 +2215,7 @@ type_traverse(PyTypeObject *type, visitproc visit, void *arg)
VISIT
(
type
->
tp_base
);
/* There's no need to visit type->tp_subclasses or
((PyHeapTypeObject *)type)->slots, because they can't be involved
((PyHeapTypeObject *)type)->
ht_
slots, because they can't be involved
in cycles; tp_subclasses is a list of weak references,
and slots is a tuple of strings. */
...
...
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