]> www.ginac.de Git - ginac.git/blobdiff - ginac/function.pl
- See if __GNUC__ < 2.97 before using std::vector<..,malloc_alloc>. Sorry,
[ginac.git] / ginac / function.pl
index ac2dc877dfa4322f7d63f64b7b707e4dc567755f..d97e58f674e916b0b81109afdbd7dae20b732008 100755 (executable)
@@ -131,14 +131,12 @@ $evalf_switch_statement=generate(
        <<'END_OF_EVALF_SWITCH_STATEMENT','eseq[${N}-1]','');
        case ${N}:
                return ((evalf_funcp_${N})(registered_functions()[serial].evalf_f))(${SEQ1});
-               break;
 END_OF_EVALF_SWITCH_STATEMENT
 
 $diff_switch_statement=generate(
        <<'END_OF_DIFF_SWITCH_STATEMENT','seq[${N}-1]','');
        case ${N}:
                return ((derivative_funcp_${N})(registered_functions()[serial].derivative_f))(${SEQ1},diff_param);
-               break;
 END_OF_DIFF_SWITCH_STATEMENT
 
 $series_switch_statement=generate(
@@ -150,7 +148,6 @@ $series_switch_statement=generate(
                        res = basic::series(r, order, options);
                }
                return res;
-               break;
 END_OF_SERIES_SWITCH_STATEMENT
 
 $eval_func_implementation=generate(
@@ -203,7 +200,7 @@ $interface=<<END_OF_INTERFACE;
  *  Please do not modify it directly, edit the perl script instead!
  *  function.pl options: \$maxargs=${maxargs}
  *
- *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2001 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
@@ -470,7 +467,7 @@ inline const function &ex_to_function(const ex &e)
 // global constants
 
 extern const function some_function;
-extern const type_info & typeid_function;
+extern const std::type_info & typeid_function;
 
 #ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
@@ -490,7 +487,7 @@ $implementation=<<END_OF_IMPLEMENTATION;
  *  Please do not modify it directly, edit the perl script instead!
  *  function.pl options: \$maxargs=${maxargs}
  *
- *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2001 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
@@ -636,7 +633,7 @@ function::function() : serial(0)
 function::~function()
 {
        debugmsg("function destructor",LOGLEVEL_DESTRUCT);
-       destroy(0);
+       destroy(false);
 }
 
 function::function(const function & other)
@@ -649,7 +646,7 @@ const function & function::operator=(const function & other)
 {
        debugmsg("function operator=",LOGLEVEL_ASSIGNMENT);
        if (this != &other) {
-               destroy(1);
+               destroy(true);
                copy(other);
        }
        return *this;
@@ -889,7 +886,7 @@ ex function::thisexprseq(exvector * vp) const
 
 /** Implementation of ex::series for functions.
  *  \@see ex::series */
-ex function::series(const relational & r, int order, unsigned options = 0) const
+ex function::series(const relational & r, int order, unsigned options) const
 {
        GINAC_ASSERT(serial<registered_functions().size());
 
@@ -1003,7 +1000,7 @@ ex function::pderivative(unsigned diff_param) const // partial differentiation
        GINAC_ASSERT(serial<registered_functions().size());
        
        if (registered_functions()[serial].derivative_f==0) {
-               return Derivative(*this, lst(diff_param));
+               return Derivative(*this, lst(ex(diff_param)));
        }
        switch (registered_functions()[serial].nparams) {
                // the following lines have been generated for max. ${maxargs} parameters
@@ -1084,7 +1081,7 @@ unsigned function::find_function(const std::string &name, unsigned nparams)
 //////////
 
 const function some_function;
-const type_info & typeid_function=typeid(some_function);
+const std::type_info & typeid_function=typeid(some_function);
 
 #ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC