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
d4fee287
Kaydet (Commit)
d4fee287
authored
Ock 08, 2003
tarafından
Greg Ward
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Rewrite awkward/ungrammatical sentence.
Typo fix.
üst
d97b01cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
newtypes.tex
Doc/ext/newtypes.tex
+3
-3
No files found.
Doc/ext/newtypes.tex
Dosyayı görüntüle @
d4fee287
...
...
@@ -52,8 +52,8 @@ typedef struct {
}
noddy
_
NoddyObject;
\end{verbatim}
This is what a Noddy object will contain
. In this case
nothing more
than every Python object contains
-
a refcount and a pointer to a type
This is what a Noddy object will contain
---in this case,
nothing more
than every Python object contains
, namely
a refcount and a pointer to a type
object. These are the fields the
\code
{
PyObject
_
HEAD
}
macro brings
in. The reason for the macro is to standardize the layout and to
enable special debugging fields in debug builds. Note that there is
...
...
@@ -61,7 +61,7 @@ no semicolon after the \code{PyObject_HEAD} macro; one is included in
the macro definition. Be wary of adding one by accident; it's easy to
do from habit, and your compiler might not complain, but someone
else's probably will! (On Windows, MSVC is known to call this an
error and refuse to
produce compiled
code.)
error and refuse to
compile the
code.)
For contrast, let's take a look at the corresponding definition for
standard Python integers:
...
...
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