| 1 | use crate::object::PyObject; |
| 2 | use libc::wchar_t; |
| 3 | use std::os::raw::{c_char, c_int}; |
| 4 | |
| 5 | unsafeextern "C" { |
| 6 | #[cfg_attr (PyPy, link_name = "PyPySys_GetObject" )] |
| 7 | pub unsafefn PySys_GetObject(arg1: *const c_char) -> *mut PyObject; |
| 8 | #[cfg_attr (PyPy, link_name = "PyPySys_SetObject" )] |
| 9 | pub unsafefn PySys_SetObject(arg1: *const c_char, arg2: *mut PyObject) -> c_int; |
| 10 | |
| 11 | #[cfg_attr ( |
| 12 | Py_3_11, |
| 13 | deprecated( |
| 14 | note = "Deprecated in Python 3.11, use `PyConfig.argv` and `PyConfig.parse_argv` instead" |
| 15 | ) |
| 16 | )] |
| 17 | pub unsafefn PySys_SetArgv(arg1: c_int, arg2: *mut *mut wchar_t); |
| 18 | #[cfg_attr ( |
| 19 | Py_3_11, |
| 20 | deprecated( |
| 21 | note = "Deprecated in Python 3.11, use `PyConfig.argv` and `PyConfig.parse_argv` instead" |
| 22 | ) |
| 23 | )] |
| 24 | pub unsafefn PySys_SetArgvEx(arg1: c_int, arg2: *mut *mut wchar_t, arg3: c_int); |
| 25 | pub unsafefn PySys_SetPath(arg1: *const wchar_t); |
| 26 | |
| 27 | #[cfg_attr (PyPy, link_name = "PyPySys_WriteStdout" )] |
| 28 | pub unsafefn PySys_WriteStdout(format: *const c_char, ...); |
| 29 | #[cfg_attr (PyPy, link_name = "PyPySys_WriteStderr" )] |
| 30 | pub unsafefn PySys_WriteStderr(format: *const c_char, ...); |
| 31 | pub unsafefn PySys_FormatStdout(format: *const c_char, ...); |
| 32 | pub unsafefn PySys_FormatStderr(format: *const c_char, ...); |
| 33 | |
| 34 | #[cfg_attr ( |
| 35 | Py_3_13, |
| 36 | deprecated( |
| 37 | note = "Deprecated since Python 3.13. Clear sys.warnoptions and warnings.filters instead." |
| 38 | ) |
| 39 | )] |
| 40 | pub unsafefn PySys_ResetWarnOptions(); |
| 41 | #[cfg_attr (Py_3_11, deprecated(note = "Python 3.11" ))] |
| 42 | pub unsafefn PySys_AddWarnOption(arg1: *const wchar_t); |
| 43 | #[cfg_attr (Py_3_11, deprecated(note = "Python 3.11" ))] |
| 44 | pub unsafefn PySys_AddWarnOptionUnicode(arg1: *mut PyObject); |
| 45 | #[cfg_attr (Py_3_11, deprecated(note = "Python 3.11" ))] |
| 46 | pub unsafefn PySys_HasWarnOptions() -> c_int; |
| 47 | |
| 48 | pub unsafefn PySys_AddXOption(arg1: *const wchar_t); |
| 49 | pub unsafefn PySys_GetXOptions() -> *mut PyObject; |
| 50 | } |
| 51 | |