PHP 8.2.30
Preview: pylifecycle.h Size: 2.75 KB
//opt/alt/python313/include/python3.13/cpython/pylifecycle.h

#ifndef Py_CPYTHON_PYLIFECYCLE_H
#  error "this header file must not be included directly"
#endif

/* Py_FrozenMain is kept out of the Limited API until documented and present
   in all builds of Python */
PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv);

/* PEP 432 Multi-phase initialization API (Private while provisional!) */

PyAPI_FUNC(PyStatus) Py_PreInitialize(
    const PyPreConfig *src_config);
PyAPI_FUNC(PyStatus) Py_PreInitializeFromBytesArgs(
    const PyPreConfig *src_config,
    Py_ssize_t argc,
    char **argv);
PyAPI_FUNC(PyStatus) Py_PreInitializeFromArgs(
    const PyPreConfig *src_config,
    Py_ssize_t argc,
    wchar_t **argv);


/* Initialization and finalization */

PyAPI_FUNC(PyStatus) Py_InitializeFromConfig(
    const PyConfig *config);

// Python 3.8 provisional API (PEP 587)
PyAPI_FUNC(PyStatus) _Py_InitializeMain(void);

PyAPI_FUNC(int) Py_RunMain(void);


PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err);

PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);

/* --- PyInterpreterConfig ------------------------------------ */

#define PyInterpreterConfig_DEFAULT_GIL (0)
#define PyInterpreterConfig_SHARED_GIL (1)
#define PyInterpreterConfig_OWN_GIL (2)

typedef struct {
    // XXX "allow_object_sharing"?  "own_objects"?
    int use_main_obmalloc;
    int allow_fork;
    int allow_exec;
    int allow_threads;
    int allow_daemon_threads;
    int check_multi_interp_extensions;
    int gil;
} PyInterpreterConfig;

#define _PyInterpreterConfig_INIT \
    { \
        .use_main_obmalloc = 0, \
        .allow_fork = 0, \
        .allow_exec = 0, \
        .allow_threads = 1, \
        .allow_daemon_threads = 0, \
        .check_multi_interp_extensions = 1, \
        .gil = PyInterpreterConfig_OWN_GIL, \
    }

// gh-117649: The free-threaded build does not currently support single-phase
// init extensions in subinterpreters. For now, we ensure that
// `check_multi_interp_extensions` is always `1`, even in the legacy config.
#ifdef Py_GIL_DISABLED
#  define _PyInterpreterConfig_LEGACY_CHECK_MULTI_INTERP_EXTENSIONS 1
#else
#  define _PyInterpreterConfig_LEGACY_CHECK_MULTI_INTERP_EXTENSIONS 0
#endif

#define _PyInterpreterConfig_LEGACY_INIT \
    { \
        .use_main_obmalloc = 1, \
        .allow_fork = 1, \
        .allow_exec = 1, \
        .allow_threads = 1, \
        .allow_daemon_threads = 1, \
        .check_multi_interp_extensions = _PyInterpreterConfig_LEGACY_CHECK_MULTI_INTERP_EXTENSIONS, \
        .gil = PyInterpreterConfig_SHARED_GIL, \
    }

PyAPI_FUNC(PyStatus) Py_NewInterpreterFromConfig(
    PyThreadState **tstate_p,
    const PyInterpreterConfig *config);

typedef void (*atexit_datacallbackfunc)(void *);
PyAPI_FUNC(int) PyUnstable_AtExit(
        PyInterpreterState *, atexit_datacallbackfunc, void *);

Directory Contents

Dirs: 0 × Files: 59

Name Size Perms Modified Actions
3.32 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.14 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.15 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.05 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.09 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.19 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
14.85 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.07 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
909 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.79 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
5.46 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.56 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
3.78 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
652 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
232 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
900 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.17 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
6.88 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.93 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
725 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
8.00 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.76 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.72 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
5.00 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
5.45 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.17 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.22 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.02 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
7.52 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
18.63 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
3.73 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.28 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
848 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
3.83 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
16.12 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
18.68 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
28.56 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
23.77 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.35 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.38 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.84 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
444 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.90 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.35 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.75 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.78 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
9.24 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
5.31 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
4.23 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.47 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
707 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.00 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
775 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
282 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
823 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
1.30 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
24.49 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download
564 B lrw-r--r-- 2025-12-05 16:06:33
Edit Download
2.20 KB lrw-r--r-- 2025-12-05 16:06:33
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).