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
82972e7f
Kaydet (Commit)
82972e7f
authored
Nis 14, 2006
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Patch #702933: Undocument PyObject_NEW, PyObject_NEW_VAR,
and PyObject_DEL.
üst
b17f12bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
20 deletions
+1
-20
memory.tex
Doc/api/memory.tex
+1
-3
newtypes.tex
Doc/api/newtypes.tex
+0
-17
No files found.
Doc/api/memory.tex
Dosyayı görüntüle @
82972e7f
...
...
@@ -195,9 +195,7 @@ free(buf1); /* Fatal -- should be PyMem_Del() */
In addition to the functions aimed at handling raw memory blocks from
the Python heap, objects in Python are allocated and released with
\cfunction
{
PyObject
_
New()
}
,
\cfunction
{
PyObject
_
NewVar()
}
and
\cfunction
{
PyObject
_
Del()
}
, or with their corresponding macros
\cfunction
{
PyObject
_
NEW()
}
,
\cfunction
{
PyObject
_
NEW
_
VAR()
}
and
\cfunction
{
PyObject
_
DEL()
}
.
\cfunction
{
PyObject
_
Del()
}
.
These will be explained in the next chapter on defining and
implementing new object types in C.
Doc/api/newtypes.tex
Dosyayı görüntüle @
82972e7f
...
...
@@ -62,23 +62,6 @@ defining new object types.
after this call as the memory is no longer a valid Python object.
\end{cfuncdesc}
\begin{cfuncdesc}
{
\var
{
TYPE
}
*
}{
PyObject
_
NEW
}{
TYPE, PyTypeObject *type
}
Macro version of
\cfunction
{
PyObject
_
New()
}
, to gain performance at
the expense of safety. This does not check
\var
{
type
}
for a
\NULL
{}
value.
\end{cfuncdesc}
\begin{cfuncdesc}
{
\var
{
TYPE
}
*
}{
PyObject
_
NEW
_
VAR
}{
TYPE, PyTypeObject *type,
Py
_
ssize
_
t size
}
Macro version of
\cfunction
{
PyObject
_
NewVar()
}
, to gain performance
at the expense of safety. This does not check
\var
{
type
}
for a
\NULL
{}
value.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyObject
_
DEL
}{
PyObject *op
}
Macro version of
\cfunction
{
PyObject
_
Del()
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
Py
_
InitModule
}{
char *name,
PyMethodDef *methods
}
Create a new module object based on a name and table of functions,
...
...
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