cpython/Include/internal/pycore_asdl.h

#ifndef Py_INTERNAL_ASDL_H
#define Py_INTERNAL_ASDL_H
#ifdef __cplusplus
extern "C" {
#endif

#ifndef Py_BUILD_CORE
#  error "this header requires Py_BUILD_CORE define"
#endif

#include "pycore_pyarena.h"       // _PyArena_Malloc()

identifier;
string;
object;
constant;

/* It would be nice if the code generated by asdl_c.py was completely
   independent of Python, but it is a goal the requires too much work
   at this stage.  So, for example, I'll represent identifiers as
   interned Python strings.
*/

#define _ASDL_SEQ_HEAD

asdl_seq;

asdl_generic_seq;

asdl_identifier_seq;

asdl_int_seq;

asdl_generic_seq *_Py_asdl_generic_seq_new(Py_ssize_t size, PyArena *arena);
asdl_identifier_seq *_Py_asdl_identifier_seq_new(Py_ssize_t size, PyArena *arena);
asdl_int_seq *_Py_asdl_int_seq_new(Py_ssize_t size, PyArena *arena);


#define GENERATE_ASDL_SEQ_CONSTRUCTOR(NAME, TYPE)

#define asdl_seq_GET_UNTYPED(S, I)
#define asdl_seq_GET(S, I)
#define asdl_seq_LEN(S)

#ifdef Py_DEBUG
#define asdl_seq_SET
#else
#define asdl_seq_SET(S, I, V)
#endif

#ifdef Py_DEBUG
#define asdl_seq_SET_UNTYPED
#else
#define asdl_seq_SET_UNTYPED(S, I, V)
#endif

#ifdef __cplusplus
}
#endif
#endif /* !Py_INTERNAL_ASDL_H */