use as_ref for PyRawObject in __new__ wrapper
This commit is contained in:
parent
eb9050ab90
commit
b5ffefc50c
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "pyo3cls"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
description = "Proc macros for PyO3 package"
|
||||
authors = ["PyO3 Project and Contributors <https://github.com/PyO3"]
|
||||
homepage = "https://github.com/pyo3/pyo3"
|
||||
|
|
|
@ -128,7 +128,7 @@ pub fn impl_wrap_new(cls: &Box<syn::Ty>, name: &syn::Ident, spec: &FnSpec) -> To
|
|||
|item| if item.1.py {syn::Ident::from("_py")} else {
|
||||
syn::Ident::from(format!("arg{}", item.0))}).collect();
|
||||
let cb = quote! {{
|
||||
#cls::#name(&_obj, #(#names),*)
|
||||
#cls::#name(_obj.as_ref(), #(#names),*)
|
||||
}};
|
||||
|
||||
let body = impl_arg_params(spec, cb);
|
||||
|
|
Loading…
Reference in a new issue