cpython/Include/internal/pycore_atexit.h

#ifndef Py_INTERNAL_ATEXIT_H
#define Py_INTERNAL_ATEXIT_H

#include "pycore_lock.h"        // PyMutex

#ifdef __cplusplus
extern "C" {
#endif

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


//###############
// runtime atexit

atexit_callbackfunc;

struct _atexit_runtime_state {};


//###################
// interpreter atexit

atexit_datacallbackfunc;

atexit_callback;

atexit_py_callback;

struct atexit_state {};

// Export for '_interpchannels' shared extension
PyAPI_FUNC(int) _Py_AtExit(
    PyInterpreterState *interp,
    atexit_datacallbackfunc func,
    void *data);

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