remove unneeded macro

This commit is contained in:
Nikolay Kim 2017-06-11 16:49:25 -07:00
parent 05d4a0a9a4
commit 805429e0f4
2 changed files with 1 additions and 5 deletions

View file

@ -169,9 +169,6 @@ macro_rules! cstr(
);
// AST coercion macros (https://danielkeep.github.io/tlborm/book/blk-ast-coercion.html)
#[macro_export] #[doc(hidden)]
macro_rules! py_coerce_expr { ($s:expr) => {$s} }
#[macro_export] #[doc(hidden)]
macro_rules! py_replace_expr {
($_t:tt $sub:expr) => {$sub};

View file

@ -151,8 +151,7 @@ macro_rules! tuple_conversion ({$length:expr,$(($refN:ident, $n:tt, $T:ident)),+
fn into_tuple(self, py: Python) -> PyTuple {
unsafe {
let ptr = ffi::PyTuple_New($length);
$(py_coerce_expr!(
ffi::PyTuple_SetItem(ptr, $n, self.$n.into_object(py).into_ptr()));)+;
$(ffi::PyTuple_SetItem(ptr, $n, self.$n.into_object(py).into_ptr());)+;
PyTuple(PyPtr::from_owned_ptr_or_panic(ptr))
}
}