cpython/Modules/xxlimited_35.c


/* This module is compiled using limited API from Python 3.5,
 * making sure that it works as expected.
 *
 * See the xxlimited module for an extension module template.
 */

// Test the limited C API version 3.5
#include "pyconfig.h"   // Py_GIL_DISABLED
#ifndef Py_GIL_DISABLED
#define Py_LIMITED_API
#endif

#include "Python.h"

/* Xxo objects */

static PyObject *ErrorObject;

XxoObject;

static PyObject *Xxo_Type;

#define XxoObject_Check(v)

static XxoObject *
newXxoObject(PyObject *arg)
{}

/* Xxo methods */

static int
Xxo_traverse(XxoObject *self, visitproc visit, void *arg)
{}

static int
Xxo_clear(XxoObject *self)
{}

static void
Xxo_finalize(XxoObject *self)
{}

static PyObject *
Xxo_demo(XxoObject *self, PyObject *args)
{}

static PyMethodDef Xxo_methods[] =;

static PyObject *
Xxo_getattro(XxoObject *self, PyObject *name)
{}

static int
Xxo_setattr(XxoObject *self, const char *name, PyObject *v)
{}

static PyType_Slot Xxo_Type_slots[] =;

static PyType_Spec Xxo_Type_spec =;

/* --------------------------------------------------------------------- */

/* Function of two integers returning integer */

PyDoc_STRVAR(xx_foo_doc,
"foo(i,j)\n\
\n\
Return the sum of i and j.");

static PyObject *
xx_foo(PyObject *self, PyObject *args)
{}


/* Function of no arguments returning new Xxo object */

static PyObject *
xx_new(PyObject *self, PyObject *args)
{}

/* Test bad format character */

static PyObject *
xx_roj(PyObject *self, PyObject *args)
{}


/* ---------- */

static PyType_Slot Str_Type_slots[] =;

static PyType_Spec Str_Type_spec =;

/* ---------- */

static PyObject *
null_richcompare(PyObject *self, PyObject *other, int op)
{}

static PyType_Slot Null_Type_slots[] =;

static PyType_Spec Null_Type_spec =;

/* ---------- */

/* List of functions defined in the module */

static PyMethodDef xx_methods[] =;

PyDoc_STRVAR(module_doc,
"This is a module for testing limited API from Python 3.5.");

static int
xx_modexec(PyObject *m)
{}


static PyModuleDef_Slot xx_slots[] =;

static struct PyModuleDef xxmodule =;

/* Export function for the module (*must* be called PyInit_xx) */

PyMODINIT_FUNC
PyInit_xxlimited_35(void)
{}