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
2ed237bd
Kaydet (Commit)
2ed237bd
authored
Ara 07, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#4576: fix ob_type access.
üst
8f1a77d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
newtypes.rst
Doc/extending/newtypes.rst
+4
-4
No files found.
Doc/extending/newtypes.rst
Dosyayı görüntüle @
2ed237bd
...
...
@@ -265,7 +265,7 @@ allocation and deallocation. At a minimum, we need a deallocation method::
{
Py_XDECREF(self->first);
Py_XDECREF(self->last);
self->ob_type
->tp_free((PyObject*)self);
Py_TYPE(self)
->tp_free((PyObject*)self);
}
which is assigned to the :attr:`tp_dealloc` member::
...
...
@@ -759,7 +759,7 @@ to use it::
Noddy_dealloc(Noddy* self)
{
Noddy_clear(self);
self->ob_type
->tp_free((PyObject*)self);
Py_TYPE(self)
->tp_free((PyObject*)self);
}
Notice the use of a temporary variable in :cfunc:`Noddy_clear`. We use the
...
...
@@ -952,7 +952,7 @@ needs to be freed here as well. Here is an example of this function::
newdatatype_dealloc(newdatatypeobject * obj)
{
free(obj->obj_UnderlyingDatatypePtr);
obj->ob_type
->tp_free(obj);
Py_TYPE(obj)
->tp_free(obj);
}
.. index::
...
...
@@ -995,7 +995,7 @@ done. This can be done using the :cfunc:`PyErr_Fetch` and
Py_DECREF(self->my_callback);
}
obj->ob_type
->tp_free((PyObject*)self);
Py_TYPE(obj)
->tp_free((PyObject*)self);
}
...
...
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