core: reduce code duplication in codegen/builtin_fns #422
@ -1157,6 +1157,7 @@ pub fn call_abs<'ctx, G: CodeGenerator + ?Sized>(
|
||||
/// Helper macro. Used so we don't have to keep typing out the type signature of the function.
|
||||
macro_rules! call_numpy {
|
||||
($name:ident, $fn_name:literal, $get_ret_elem_type:expr, $on_elem:expr) => {
|
||||
derppening marked this conversation as resolved
Outdated
|
||||
#[allow(clippy::redundant_closure_call)]
|
||||
derppening marked this conversation as resolved
Outdated
derppening
commented
I don't think it's appropriate to name the macro Same for the macros below. I don't think it's appropriate to name the macro `call_numpy`, as it gives the impression that the macro actually invokes the function rather than generates a function which can in turn be used.
Same for the macros below.
|
||||
pub fn $name<'ctx, G: CodeGenerator + ?Sized>(
|
||||
generator: &mut G,
|
||||
ctx: &mut CodeGenContext<'ctx, '_>,
|
||||
|
Loading…
Reference in New Issue
Block a user
Documentation comments are to explain what this macro does.
Same for the macros below.