| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 68c76ed commit c4a0b9c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1249,18 +1249,18 @@ Here's the simplest example of a custom converter, from ``Modules/zlibmodule.c`` | |||
| 1249 | 1249 | ||
| 1250 | 1250 | /*[python input] | |
| 1251 | 1251 | ||
| 1252 | - class uint_converter(CConverter): | ||
| 1252 | + class capped_uint_converter(CConverter): | ||
| 1253 | 1253 | type = 'unsigned int' | |
| 1254 | - converter = 'uint_converter' | ||
| 1254 | + converter = 'capped_uint_converter' | ||
| 1255 | 1255 | ||
| 1256 | 1256 | [python start generated code]*/ | |
| 1257 | - /*[python end generated code: checksum=da39a3ee5e6b4b0d3255bfef95601890afd80709]*/ | ||
| 1257 | + /*[python end generated code: output=da39a3ee5e6b4b0d input=35521e4e733823c7]*/ | ||
| 1258 | 1258 | ||
| 1259 | - This block adds a converter to Argument Clinic named ``uint``. Parameters | ||
| 1260 | - declared as ``uint`` will be declared as type ``unsigned int``, and will | ||
| 1261 | - be parsed by the ``'O&'`` format unit, which will call the ``uint_converter`` | ||
| 1262 | - converter function. | ||
| 1263 | - ``uint`` variables automatically support default values. | ||
| 1259 | + This block adds a converter to Argument Clinic named ``capped_uint``. Parameters | ||
| 1260 | + declared as ``capped_uint`` will be declared as type ``unsigned int``, and will | ||
| 1261 | + be parsed by the ``'O&'`` format unit, which will call the | ||
| 1262 | + ``capped_uint_converter`` converter function. ``capped_uint`` variables | ||
| 1263 | + automatically support default values. | ||
| 1264 | 1264 | ||
| 1265 | 1265 | More sophisticated custom converters can insert custom C code to | |
| 1266 | 1266 | handle initialization and cleanup. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments