/*[clinic input]
output preset buffer
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=531a13e5785536fb]*/

#ifdef FOO
/*[clinic input]
spam

    x: int
    /
[clinic start generated code]*/

static PyObject *
spam_impl(PyModuleDef *module, int x)
/*[clinic end generated code: output=cec95ae27d4da8c7 input=de88435e91bf3e25]*/
{
    return PyLong_FromLong(x);
}
#else
/*[clinic input]
spam

    x: str
    /
[clinic start generated code]*/

static PyObject *
spam_impl(PyModuleDef *module, const char *x)
/*[clinic end generated code: output=37007a6efeb7c2a4 input=948388df245c885a]*/
{
    return PyUnicode_FromString(x);
}
#endif

/*[clinic input]
dump buffer
[clinic start generated code]*/

#if defined(FOO)

PyDoc_STRVAR(spam__doc__,
"spam($module, x, /)\n"
"--");

#define SPAM_METHODDEF    \
    {"spam", (PyCFunction)spam, METH_VARARGS, spam__doc__},

static PyObject *
spam(PyModuleDef *module, PyObject *args)
{
    PyObject *return_value = NULL;
    int x;

    if (!PyArg_ParseTuple(args,
        "i:spam",
        &x))
        goto exit;
    return_value = spam_impl(module, x);

exit:
    return return_value;
}

#endif /* defined(FOO) */

#if !defined(FOO)

PyDoc_STRVAR(spam__doc__,
"spam($module, x, /)\n"
"--");

#define SPAM_METHODDEF    \
    {"spam", (PyCFunction)spam, METH_VARARGS, spam__doc__},

static PyObject *
spam(PyModuleDef *module, PyObject *args)
{
    PyObject *return_value = NULL;
    const char *x;

    if (!PyArg_ParseTuple(args,
        "s:spam",
        &x))
        goto exit;
    return_value = spam_impl(module, x);

exit:
    return return_value;
}

#endif /* !defined(FOO) */

#ifndef SPAM_METHODDEF
    #define SPAM_METHODDEF
#endif /* !defined(SPAM_METHODDEF) */

#ifndef SPAM_METHODDEF
    #define SPAM_METHODDEF
#endif /* !defined(SPAM_METHODDEF) */
/*[clinic end generated code: output=2f8154536d9a8c26 input=524ce2e021e4eba6]*/
