summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2015-11-21 10:57:15 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2015-11-21 10:57:15 (GMT)
commit36befa5b4c37b34de9c7f59eba26575b255114cf (patch)
treed87a8cd77c6bbdfeb0e15a8320740da4051ab786 /Doc/howto
parent266b276f34db5cc106d100f63b631af1f1f8e0e2 (diff)
parente99e97762cc75ad94056275ddcae9c84d63a3412 (diff)
downloadcpython-36befa5b4c37b34de9c7f59eba26575b255114cf.zip
cpython-36befa5b4c37b34de9c7f59eba26575b255114cf.tar.gz
cpython-36befa5b4c37b34de9c7f59eba26575b255114cf.tar.bz2
Issue #25626: Merge zlib fix from 3.5
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/clinic.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/howto/clinic.rst b/Doc/howto/clinic.rst
index 7524c4a..b04edea 100644
--- a/Doc/howto/clinic.rst
+++ b/Doc/howto/clinic.rst
@@ -1249,18 +1249,18 @@ Here's the simplest example of a custom converter, from ``Modules/zlibmodule.c``
/*[python input]
- class uint_converter(CConverter):
+ class capped_uint_converter(CConverter):
type = 'unsigned int'
- converter = 'uint_converter'
+ converter = 'capped_uint_converter'
[python start generated code]*/
- /*[python end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/
+ /*[python end generated code: output=da39a3ee5e6b4b0d input=35521e4e733823c7]*/
-This block adds a converter to Argument Clinic named ``uint``. Parameters
-declared as ``uint`` will be declared as type ``unsigned int``, and will
-be parsed by the ``'O&'`` format unit, which will call the ``uint_converter``
-converter function.
-``uint`` variables automatically support default values.
+This block adds a converter to Argument Clinic named ``capped_uint``. Parameters
+declared as ``capped_uint`` will be declared as type ``unsigned int``, and will
+be parsed by the ``'O&'`` format unit, which will call the
+``capped_uint_converter`` converter function. ``capped_uint`` variables
+automatically support default values.
More sophisticated custom converters can insert custom C code to
handle initialization and cleanup.