summaryrefslogtreecommitdiffstats
path: root/Doc/library/ctypes.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-19 20:05:49 (GMT)
committerGeorg Brandl <georg@python.org>2011-01-19 20:05:49 (GMT)
commitecdd63f56c7d2e890a5182f6d47aa29e4ec95022 (patch)
treeedbc76dd44025703132986f5297ff503f342dba0 /Doc/library/ctypes.rst
parent41a99bc20d378c9bb624a14b0d993be30c7b210d (diff)
downloadcpython-ecdd63f56c7d2e890a5182f6d47aa29e4ec95022.zip
cpython-ecdd63f56c7d2e890a5182f6d47aa29e4ec95022.tar.gz
cpython-ecdd63f56c7d2e890a5182f6d47aa29e4ec95022.tar.bz2
#10944: add c_bool to types table.
Diffstat (limited to 'Doc/library/ctypes.rst')
-rw-r--r--Doc/library/ctypes.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst
index f006565..33d1f7e 100644
--- a/Doc/library/ctypes.rst
+++ b/Doc/library/ctypes.rst
@@ -216,6 +216,8 @@ Fundamental data types
+----------------------+------------------------------------------+----------------------------+
| ctypes type | C type | Python type |
+======================+==========================================+============================+
+| :class:`c_bool` | :c:type:`_Bool` | bool (1) |
++----------------------+------------------------------------------+----------------------------+
| :class:`c_char` | :c:type:`char` | 1-character bytes object |
+----------------------+------------------------------------------+----------------------------+
| :class:`c_wchar` | :c:type:`wchar_t` | 1-character string |
@@ -254,6 +256,9 @@ Fundamental data types
| :class:`c_void_p` | :c:type:`void *` | int or ``None`` |
+----------------------+------------------------------------------+----------------------------+
+(1)
+ The constructor accepts any object with a truth value.
+
All these types can be created by calling them with an optional initializer of
the correct type and value::