Fix build
This commit is contained in:
parent
e5f77018f1
commit
5223cf4730
|
@ -5,7 +5,7 @@
|
|||
|
||||
#[macro_use] extern crate cpython;
|
||||
|
||||
use cpython::{Python, PyObject, PyType, PyRustObject, PyRustType, PyResult, GILProtected};
|
||||
use cpython::{Python, PyObject, PyRustObject, PyRustType, PyResult, GILProtected};
|
||||
use std::cell::RefCell;
|
||||
|
||||
static MY_TYPE: GILProtected<RefCell<Option<PyRustType<i32>>>> = GILProtected::new(RefCell::new(None));
|
||||
|
|
|
@ -208,7 +208,7 @@ impl <'p, T, B> PyRustTypeBuilder<'p, T, B> where T: 'static + Send, B: PythonBa
|
|||
/// Sets the constructor (__new__ method)
|
||||
///
|
||||
/// As `new` argument, use either the `py_fn!()` or the `py_class_method!()` macro.
|
||||
pub fn set_new(mut self, new: T) -> Self where T: TypeConstructor {
|
||||
pub fn set_new<N>(mut self, new: N) -> Self where N: TypeConstructor {
|
||||
let tp_new = new.tp_new();
|
||||
|
||||
#[cfg(feature="python27-sys")] unsafe {
|
||||
|
|
Loading…
Reference in a new issue