1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use crate::{PyConfig, PyPreConfig, PyStatus, Py_ssize_t};
use libc::wchar_t;
use std::os::raw::{c_char, c_int};
extern "C" {
pub fn Py_PreInitialize(src_config: *const PyPreConfig) -> PyStatus;
pub fn Py_PreInitializeFromBytesArgs(
src_config: *const PyPreConfig,
argc: Py_ssize_t,
argv: *mut *mut c_char,
) -> PyStatus;
pub fn Py_PreInitializeFromArgs(
src_config: *const PyPreConfig,
argc: Py_ssize_t,
argv: *mut *mut wchar_t,
) -> PyStatus;
pub fn _Py_IsCoreInitialized() -> c_int;
pub fn Py_InitializeFromConfig(config: *const PyConfig) -> PyStatus;
pub fn _Py_InitializeMain() -> PyStatus;
pub fn Py_RunMain() -> c_int;
pub fn Py_ExitStatusException(status: PyStatus) -> !;
}