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
cf703f04
Kaydet (Commit)
cf703f04
authored
Agu 04, 2000
tarafından
Moshe Zadka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removing warnings found by gcc -Wall
üst
92a69138
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
bufferobject.c
Objects/bufferobject.c
+5
-4
object.c
Objects/object.c
+4
-0
No files found.
Objects/bufferobject.c
Dosyayı görüntüle @
cf703f04
...
@@ -141,6 +141,7 @@ PyBuffer_FromReadWriteMemory(void *ptr, int size)
...
@@ -141,6 +141,7 @@ PyBuffer_FromReadWriteMemory(void *ptr, int size)
PyObject
*
PyObject
*
PyBuffer_New
(
int
size
)
PyBuffer_New
(
int
size
)
{
{
PyObject
*
o
;
PyBufferObject
*
b
;
PyBufferObject
*
b
;
if
(
size
<
0
)
{
if
(
size
<
0
)
{
...
@@ -149,10 +150,10 @@ PyBuffer_New(int size)
...
@@ -149,10 +150,10 @@ PyBuffer_New(int size)
return
NULL
;
return
NULL
;
}
}
/* PyObject_New is inlined */
/* PyObject_New is inlined */
b
=
(
PyBufferObject
*
)
PyObject_MALLOC
(
sizeof
(
*
b
)
+
size
);
o
=
PyObject_MALLOC
(
sizeof
(
*
b
)
+
size
);
if
(
b
==
NULL
)
if
(
o
==
NULL
)
return
PyErr_NoMemory
();
return
PyErr_NoMemory
();
PyObject_INIT
((
PyObject
*
)
b
,
&
PyBuffer_Type
);
b
=
(
PyBufferObject
*
)
PyObject_INIT
(
o
,
&
PyBuffer_Type
);
b
->
b_base
=
NULL
;
b
->
b_base
=
NULL
;
b
->
b_ptr
=
(
void
*
)(
b
+
1
);
b
->
b_ptr
=
(
void
*
)(
b
+
1
);
...
@@ -162,7 +163,7 @@ PyBuffer_New(int size)
...
@@ -162,7 +163,7 @@ PyBuffer_New(int size)
b
->
b_hash
=
-
1
;
b
->
b_hash
=
-
1
;
#endif
#endif
return
(
PyObject
*
)
b
;
return
o
;
}
}
/* Methods */
/* Methods */
...
...
Objects/object.c
Dosyayı görüntüle @
cf703f04
...
@@ -1123,6 +1123,10 @@ _PyTrash_deposit_object(PyObject *op)
...
@@ -1123,6 +1123,10 @@ _PyTrash_deposit_object(PyObject *op)
typecode
=
Py_TRASHCAN_FRAME
;
typecode
=
Py_TRASHCAN_FRAME
;
else
if
(
PyTraceBack_Check
(
op
))
else
if
(
PyTraceBack_Check
(
op
))
typecode
=
Py_TRASHCAN_TRACEBACK
;
typecode
=
Py_TRASHCAN_TRACEBACK
;
else
/* We have a bug here -- those are the only types in GC */
{
Py_FatalError
(
"Type not supported in GC -- internal bug"
);
return
;
/* pacify compiler -- execution never here */
}
op
->
ob_refcnt
=
typecode
;
op
->
ob_refcnt
=
typecode
;
op
->
ob_type
=
(
PyTypeObject
*
)
_PyTrash_delete_later
;
op
->
ob_type
=
(
PyTypeObject
*
)
_PyTrash_delete_later
;
...
...
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