File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,5 @@ num-complex = "0.1"
15
15
ndarray = " 0.10"
16
16
17
17
[dependencies .pyo3 ]
18
- git = " https://github.com/PyO3/pyo3.git "
19
- rev = " c22bec6124ab68f47a7f28550931e3060f89071b "
18
+ git = " https://github.com/PyO3/pyo3"
19
+ rev = " 4169b0317826dc62eafcdd0faab7d009f6808c06 "
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use super::*;
12
12
13
13
/// Untyped safe interface for NumPy ndarray.
14
14
pub struct PyArray ( PyObject ) ;
15
- pyobject_native_type ! ( PyArray , npyffi:: PyArray_Type_Global , npyffi:: PyArray_Check ) ;
15
+ pyobject_native_type ! ( PyArray , * npyffi:: PyArray_Type_Ptr , npyffi:: PyArray_Check ) ;
16
16
17
17
impl PyArray {
18
18
pub fn as_array_ptr ( & self ) -> * mut npyffi:: PyArrayObject {
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ pub struct PyArrayModule<'py> {
26
26
}
27
27
28
28
#[ allow( non_upper_case_globals) ]
29
- pub static mut PyArray_Type_Global : PyTypeObject = ffi :: PyTypeObject_INIT ;
29
+ pub static mut PyArray_Type_Ptr : * mut PyTypeObject = null_mut ( ) ;
30
30
31
31
impl < ' py > Deref for PyArrayModule < ' py > {
32
32
type Target = PyModule ;
@@ -55,7 +55,7 @@ impl<'py> PyArrayModule<'py> {
55
55
} ;
56
56
let mod_ = PyArrayModule { numpy, api } ;
57
57
unsafe {
58
- PyArray_Type_Global = * mod_. get_type_object ( ArrayType :: PyArray_Type ) ;
58
+ PyArray_Type_Ptr = mod_. get_type_object ( ArrayType :: PyArray_Type ) ;
59
59
}
60
60
Ok ( mod_)
61
61
}
@@ -378,12 +378,10 @@ impl_array_type!(
378
378
379
379
#[ allow( non_snake_case) ]
380
380
pub unsafe fn PyArray_Check ( op : * mut PyObject ) -> c_int {
381
- let typeobj_ptr: * mut PyTypeObject = & mut PyArray_Type_Global ;
382
- ffi:: PyObject_TypeCheck ( op, typeobj_ptr)
381
+ ffi:: PyObject_TypeCheck ( op, PyArray_Type_Ptr )
383
382
}
384
383
385
384
#[ allow( non_snake_case) ]
386
385
pub unsafe fn PyArray_CheckExact ( op : * mut PyObject ) -> c_int {
387
- let typeobj_ptr: * mut _ = & mut PyArray_Type_Global ;
388
- ( ffi:: Py_TYPE ( op) == typeobj_ptr) as c_int
386
+ ( ffi:: Py_TYPE ( op) == PyArray_Type_Ptr ) as c_int
389
387
}
You can’t perform that action at this time.
0 commit comments