1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use libc::{c_char, c_int}; use pyport::Py_ssize_t; use object::PyObject; #[cfg_attr(windows, link(name="pythonXY"))] extern "C" { pub fn PyErr_WarnEx(category: *mut PyObject, msg: *const c_char, stacklevel: Py_ssize_t) -> c_int; pub fn PyErr_WarnExplicit(arg1: *mut PyObject, arg2: *const c_char, arg3: *const c_char, arg4: c_int, arg5: *const c_char, arg6: *mut PyObject) -> c_int; } #[inline] pub unsafe fn PyErr_Warn(category: *mut PyObject, msg: *const c_char) -> c_int { PyErr_WarnEx(category, msg, 1) }