two-pass A buffer like buffer . However, a two-pass buffer can only be dumped once, and it prints out all text sent to it during all processing, even from Clinic blocks after the dumping point. file A separate “clinic file” that will be created automatically by Clinic. The filename chosen for the file is {basename}.clinic{extension} , where basename and extension were assigned the output from os.path.splitext() run on the current file. (Example: the $_{file}$destination for _pickle.c would be written to$_{_pickle.clinic.c}$ .) Clinic defines five new directives that let you reconfigure its output. The first new directive is$_{dump}$: This dumps the current contents of the named destination into the output of the current block, and empties it. This only works with buffer and two-pass destinations. This tells Clinic to output field to destination . $_{output}$also supports a special meta-destination, called $_{everything}$, which tells Clinic to output all fields to that destination . The second new directive is$_{output}$ . The most basic form of$_{output}$is like this: $_{output}$has a number of other functions: $_{output push}$and$_{output pop}$ allow you to push and pop configurations on an internal configuration stack, so that you can temporarily modify the output configuration, then easily restore the previous configuration. Simply push before your change to save the current configuration, then pop when you wish to restore the previous configuration. output preset sets Clinic’s output to one of several built-in preset configurations, as follows: file Designed to write everything to the “clinic file” that it can. You then$_{#include}$ this file near the top of your file. You may need to rearrange your file to make this work, though usually this just means creating forward declarations for various$_{typedef}$and$_{PyTypeObject}$definitions. $_{block}$Clinic’s original starting configuration. Writes everything immediately after the input block. Suppress the$_{parser_prototype}$ and$_{docstring_prototype}$ , write everything else to block . Suppress the parser_prototype and docstring_prototype , write the $_{impl_definition}$to$_{block}$ , and write everything else to$_{file}$. The default filename is$_{"{dirname}/clinic/{basename}.h"}$ . $_{buffer}$Save up most of the output from Clinic, to be written into your file near the end. For Python files implementing modules or builtin types, it’s recommended that you dump the buffer just above the static structures for your module or builtin type; these are normally very near the end. Using $_{buffer}$may require even more editing than$_{file}$ , if your file has static$_{PyMethodDef}$ arrays defined in the middle of the file. two-pass Similar to the$_{buffer}$preset, but writes forward declarations to the$_{two-pass}$ buffer, and definitions to the$_{buffer}$. This is similar to the$_{buffer}$preset, but may require less editing than$_{buffer}$. Dump the$_{two-pass}$ buffer near the top of your file, and dump the$_{buffer}$ near the end just like you would when using the$_{buffer}$preset. Suppress the parser_prototype , impl_prototype , and docstring_prototype , write the$_{impl_definition}$to$_{block}$ , and write everything else to$_{file}$. 20 output push output pop output preset <preset> output <field> <destination> dump <destination> suppress The text is suppressed—thrown away. Important: When using a$_{file}$destination, you must check in the generated file!