summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-04-09 17:53:59 (GMT)
committerGuido van Rossum <guido@python.org>1998-04-09 17:53:59 (GMT)
commitc3d3f9692d2ac91d064681621240121a9407501d (patch)
treef23fa0faa71d06d51d7b6346a4de84b4c5f4f9e7 /Include
parent6b529ae0c0751810f2a96d7a2afdde639af4d030 (diff)
downloadcpython-c3d3f9692d2ac91d064681621240121a9407501d.zip
cpython-c3d3f9692d2ac91d064681621240121a9407501d.tar.gz
cpython-c3d3f9692d2ac91d064681621240121a9407501d.tar.bz2
Add PyObject_Not().
Diffstat (limited to 'Include')
-rw-r--r--Include/abstract.h12
-rw-r--r--Include/object.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index 975c562..3491724 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -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));
/*
diff --git a/Include/object.h b/Include/object.h
index f2a83d7..18cca9f 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -271,6 +271,7 @@ extern int PyObject_SetAttr Py_PROTO((PyObject *, PyObject *, PyObject *));
extern int PyObject_HasAttr Py_PROTO((PyObject *, PyObject *));
extern long PyObject_Hash 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 PyNumber_Coerce Py_PROTO((PyObject **, PyObject **));
extern int PyNumber_CoerceEx Py_PROTO((PyObject **, PyObject **));