X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Ffunction.cppy;h=3b2ee05b770df5c7782e6d0e9e096626c1b81136;hp=789ca056c2dfa9dcebd7e0d86801b7a59e518ee9;hb=05d274b894f2f84217d308bf4d4f2202b9627c63;hpb=ae6c004bd31e02dda37357d74b641c101b116c73 diff --git a/ginac/function.cppy b/ginac/function.cppy index 789ca056..3b2ee05b 100644 --- a/ginac/function.cppy +++ b/ginac/function.cppy @@ -7,7 +7,7 @@ * Please do not modify it directly, edit function.cppy instead! * function.py options: maxargs=@maxargs@ * - * GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2019 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,11 +75,11 @@ function_options::~function_options() void function_options::initialize() { - set_name("unnamed_function", "\\\\mbox{unnamed}"); + set_name("unnamed_function", "\\mbox{unnamed}"); nparams = 0; eval_f = evalf_f = real_part_f = imag_part_f = conjugate_f = expand_f = derivative_f = expl_derivative_f = power_f = series_f = nullptr; - info_f = 0; + info_f = nullptr; evalf_params_first = true; use_return_type = false; eval_use_exvector_args = false; @@ -104,7 +104,7 @@ function_options & function_options::set_name(std::string const & n, { name = n; if (tn==std::string()) - TeX_name = "\\\\mbox{"+name+"}"; + TeX_name = "\\mbox{"+name+"}"; else TeX_name = tn; return *this; @@ -142,7 +142,7 @@ function_options & function_options::set_return_type(unsigned rt, const return_t { use_return_type = true; return_type = rt; - if (rtt != 0) + if (rtt != nullptr) return_type_tinfo = *rtt; else return_type_tinfo = make_return_type_t(); @@ -362,17 +362,12 @@ next_context: } } -ex function::eval(int level) const +ex function::eval() const { - if ((level == 1) && (flags & status_flags::evaluated)) { + if (flags & status_flags::evaluated) { return *this; } - if (level>1) { - // first evaluate children, then we will end up here again - return function(serial,evalchildren(level)); - } - GINAC_ASSERT(serial