Fix build

This commit is contained in:
Daniel Grunwald 2016-03-05 15:57:48 +01:00
parent e5f77018f1
commit 5223cf4730
2 changed files with 2 additions and 2 deletions

View file

@ -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));

View file

@ -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 {