cpython/Python/modsupport.c


/* Module support implementation */

#include "Python.h"
#include "pycore_abstract.h"   // _PyIndex_Check()
#include "pycore_object.h"     // _PyType_IsReady()

va_double;

static PyObject *va_build_value(const char *, va_list);


int
_Py_convert_optional_to_ssize_t(PyObject *obj, void *result)
{}


/* Helper for mkvalue() to scan the length of a format */

static Py_ssize_t
countformat(const char *format, char endchar)
{}


/* Generic function to create a value -- the inverse of getargs() */
/* After an original idea and first implementation by Steven Miale */

static PyObject *do_mktuple(const char**, va_list *, char, Py_ssize_t);
static int do_mkstack(PyObject **, const char**, va_list *, char, Py_ssize_t);
static PyObject *do_mklist(const char**, va_list *, char, Py_ssize_t);
static PyObject *do_mkdict(const char**, va_list *, char, Py_ssize_t);
static PyObject *do_mkvalue(const char**, va_list *);

static int
check_end(const char **p_format, char endchar)
{}

static void
do_ignore(const char **p_format, va_list *p_va, char endchar, Py_ssize_t n)
{}

static PyObject *
do_mkdict(const char **p_format, va_list *p_va, char endchar, Py_ssize_t n)
{}

static PyObject *
do_mklist(const char **p_format, va_list *p_va, char endchar, Py_ssize_t n)
{}

static int
do_mkstack(PyObject **stack, const char **p_format, va_list *p_va,
           char endchar, Py_ssize_t n)
{}

static PyObject *
do_mktuple(const char **p_format, va_list *p_va, char endchar, Py_ssize_t n)
{}

static PyObject *
do_mkvalue(const char **p_format, va_list *p_va)
{}


PyObject *
Py_BuildValue(const char *format, ...)
{}

PyAPI_FUNC(PyObject *) /* abi only */
_Py_BuildValue_SizeT(const char *format, ...)
{}

PyObject *
Py_VaBuildValue(const char *format, va_list va)
{}

PyAPI_FUNC(PyObject *) /* abi only */
_Py_VaBuildValue_SizeT(const char *format, va_list va)
{}

static PyObject *
va_build_value(const char *format, va_list va)
{}

PyObject **
_Py_VaBuildStack(PyObject **small_stack, Py_ssize_t small_stack_len,
                const char *format, va_list va, Py_ssize_t *p_nargs)
{}


int
PyModule_AddObjectRef(PyObject *mod, const char *name, PyObject *value)
{}

int
PyModule_Add(PyObject *mod, const char *name, PyObject *value)
{}

int
PyModule_AddObject(PyObject *mod, const char *name, PyObject *value)
{}

int
PyModule_AddIntConstant(PyObject *m, const char *name, long value)
{}

int
PyModule_AddStringConstant(PyObject *m, const char *name, const char *value)
{}

int
PyModule_AddType(PyObject *module, PyTypeObject *type)
{}