Fix PyMemoryView_FromBuffer
cfg
This commit is contained in:
parent
f4e64aadef
commit
dca18b3e41
|
@ -1,7 +1,5 @@
|
||||||
use crate::object::*;
|
use crate::object::*;
|
||||||
use crate::pyport::Py_ssize_t;
|
use crate::pyport::Py_ssize_t;
|
||||||
#[cfg(Py_3_11)]
|
|
||||||
use crate::Py_buffer;
|
|
||||||
use std::os::raw::{c_char, c_int};
|
use std::os::raw::{c_char, c_int};
|
||||||
use std::ptr::addr_of_mut;
|
use std::ptr::addr_of_mut;
|
||||||
|
|
||||||
|
@ -31,9 +29,9 @@ extern "C" {
|
||||||
size: Py_ssize_t,
|
size: Py_ssize_t,
|
||||||
flags: c_int,
|
flags: c_int,
|
||||||
) -> *mut PyObject;
|
) -> *mut PyObject;
|
||||||
#[cfg(Py_3_11)]
|
#[cfg(any(Py_3_11, not(Py_LIMITED_API)))]
|
||||||
#[cfg_attr(PyPy, link_name = "PyPyMemoryView_FromBuffer")]
|
#[cfg_attr(PyPy, link_name = "PyPyMemoryView_FromBuffer")]
|
||||||
pub fn PyMemoryView_FromBuffer(view: *const Py_buffer) -> *mut PyObject;
|
pub fn PyMemoryView_FromBuffer(view: *const crate::Py_buffer) -> *mut PyObject;
|
||||||
#[cfg_attr(PyPy, link_name = "PyPyMemoryView_GetContiguous")]
|
#[cfg_attr(PyPy, link_name = "PyPyMemoryView_GetContiguous")]
|
||||||
pub fn PyMemoryView_GetContiguous(
|
pub fn PyMemoryView_GetContiguous(
|
||||||
base: *mut PyObject,
|
base: *mut PyObject,
|
||||||
|
|
Loading…
Reference in a new issue