X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Ffunction.pl;h=7a2f6a9d779b9e323052d601e9caffeb95fb3ac2;hp=312640fe7c31d8b89b95fb47bb763148273acc8e;hb=a48fe78199a2249d2839195064b63ed60d47c7cd;hpb=0e474355d56a912573dc29bcaee4a1180171b066 diff --git a/ginac/function.pl b/ginac/function.pl index 312640fe..7a2f6a9d 100755 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -2,7 +2,7 @@ # function.pl options: \$maxargs=${maxargs} # -# GiNaC Copyright (C) 1999-2004 Johannes Gutenberg University Mainz, Germany +# GiNaC Copyright (C) 1999-2005 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 @@ -16,7 +16,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA $maxargs=14; @@ -60,6 +60,7 @@ $declare_function_macro = generate( <<'END_OF_DECLARE_FUNCTION_MACRO','typename T${N}','const T${N} & p${N}','GiNaC::ex(p${N})'); #define DECLARE_FUNCTION_${N}P(NAME) \\ class NAME##_SERIAL { public: static unsigned serial; }; \\ +const unsigned NAME##_NPARAMS = ${N}; \\ template<${SEQ1}> const GiNaC::function NAME(${SEQ2}) { \\ return GiNaC::function(NAME##_SERIAL::serial, ${SEQ3}); \\ } @@ -226,7 +227,7 @@ $interface=< @@ -537,6 +539,13 @@ function_options::function_options(std::string const & n, std::string const & tn set_name(n, tn); } +function_options::function_options(std::string const & n, unsigned np) +{ + initialize(); + set_name(n, std::string()); + nparams = np; +} + function_options::~function_options() { // nothing to clean up at the moment @@ -557,6 +566,7 @@ void function_options::initialize() print_use_exvector_args = false; use_remember = false; functions_with_same_name = 1; + symtree = 0; } function_options & function_options::set_name(std::string const & n,