cpython/Modules/_interpreters_common.h


#define _RESOLVE_MODINIT_FUNC_NAME(NAME)
#define RESOLVE_MODINIT_FUNC_NAME(NAME)


static int
ensure_xid_class(PyTypeObject *cls, xidatafunc getdata)
{}

#ifdef REGISTERS_HEAP_TYPES
static int
clear_xid_class(PyTypeObject *cls)
{
    PyInterpreterState *interp = PyInterpreterState_Get();
    _PyXIData_lookup_context_t ctx;
    if (_PyXIData_GetLookupContext(interp, &ctx) < 0) {
        return -1;
    }
    return _PyXIData_UnregisterClass(&ctx, cls);
}
#endif


static inline int64_t
_get_interpid(_PyXIData_t *data)
{}


/* unbound items ************************************************************/

#ifdef HAS_UNBOUND_ITEMS

#define UNBOUND_REMOVE
#define UNBOUND_ERROR
#define UNBOUND_REPLACE

// It would also be possible to add UNBOUND_REPLACE where the replacement
// value is user-provided.  There would be some limitations there, though.
// Another possibility would be something like UNBOUND_COPY, where the
// object is released but the underlying data is copied (with the "raw"
// allocator) and used when the item is popped off the queue.

static int
check_unbound(int unboundop)
{
    switch (unboundop) {
    case UNBOUND_REMOVE:
    case UNBOUND_ERROR:
    case UNBOUND_REPLACE:
        return 1;
    default:
        return 0;
    }
}

#endif