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
c3d3f969
Kaydet (Commit)
c3d3f969
authored
Nis 09, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add PyObject_Not().
üst
6b529ae0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
abstract.h
Include/abstract.h
+12
-0
object.h
Include/object.h
+1
-0
object.c
Objects/object.c
+14
-0
No files found.
Include/abstract.h
Dosyayı görüntüle @
c3d3f969
...
@@ -382,6 +382,18 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
...
@@ -382,6 +382,18 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
*/
*/
/* Implemented elsewhere:
int PyObject_Not(PyObject *o);
Returns 0 if the object, o, is considered to be true, and
1 otherwise. This is equivalent to the Python expression:
not o
This function always succeeds.
*/
PyObject
*
PyObject_Type
Py_PROTO
((
PyObject
*
o
));
PyObject
*
PyObject_Type
Py_PROTO
((
PyObject
*
o
));
/*
/*
...
...
Include/object.h
Dosyayı görüntüle @
c3d3f969
...
@@ -271,6 +271,7 @@ extern int PyObject_SetAttr Py_PROTO((PyObject *, PyObject *, PyObject *));
...
@@ -271,6 +271,7 @@ extern int PyObject_SetAttr Py_PROTO((PyObject *, PyObject *, PyObject *));
extern
int
PyObject_HasAttr
Py_PROTO
((
PyObject
*
,
PyObject
*
));
extern
int
PyObject_HasAttr
Py_PROTO
((
PyObject
*
,
PyObject
*
));
extern
long
PyObject_Hash
Py_PROTO
((
PyObject
*
));
extern
long
PyObject_Hash
Py_PROTO
((
PyObject
*
));
extern
int
PyObject_IsTrue
Py_PROTO
((
PyObject
*
));
extern
int
PyObject_IsTrue
Py_PROTO
((
PyObject
*
));
extern
int
PyObject_Not
Py_PROTO
((
PyObject
*
));
extern
int
PyCallable_Check
Py_PROTO
((
PyObject
*
));
extern
int
PyCallable_Check
Py_PROTO
((
PyObject
*
));
extern
int
PyNumber_Coerce
Py_PROTO
((
PyObject
**
,
PyObject
**
));
extern
int
PyNumber_Coerce
Py_PROTO
((
PyObject
**
,
PyObject
**
));
extern
int
PyNumber_CoerceEx
Py_PROTO
((
PyObject
**
,
PyObject
**
));
extern
int
PyNumber_CoerceEx
Py_PROTO
((
PyObject
**
,
PyObject
**
));
...
...
Objects/object.c
Dosyayı görüntüle @
c3d3f969
...
@@ -470,6 +470,20 @@ PyObject_IsTrue(v)
...
@@ -470,6 +470,20 @@ PyObject_IsTrue(v)
return
res
;
return
res
;
}
}
/* equivalent of 'not v'
Return -1 if an error occurred */
int
PyObject_Not
(
v
)
PyObject
*
v
;
{
int
res
;
res
=
PyObject_IsTrue
(
v
);
if
(
res
<
0
)
return
res
;
return
res
==
0
;
}
/* Coerce two numeric types to the "larger" one.
/* Coerce two numeric types to the "larger" one.
Increment the reference count on each argument.
Increment the reference count on each argument.
Return -1 and raise an exception if no coercion is possible
Return -1 and raise an exception if no coercion is possible
...
...
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