X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Ffunction.pl;h=88be68d89e129308ce6a5ac18d53eb766f9f2ef6;hp=b478023f50dc2d56852e3ebceac374af178aeaea;hb=12fefbca9b424cb8e9ae05d83883b96e17c7b96e;hpb=b573b0146341709649f373e0fc5c0d440877ebaf diff --git a/ginac/function.pl b/ginac/function.pl index b478023f..88be68d8 100644 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -410,7 +410,7 @@ $print_func_interface return *this; } - function_options & set_return_type(unsigned rt, tinfo_t rtt=NULL); + function_options & set_return_type(unsigned rt, const return_type_t* rtt = 0); function_options & do_not_evalf_params(); function_options & remember(unsigned size, unsigned assoc_size=0, unsigned strategy=remember_strategies::delete_never); @@ -445,7 +445,7 @@ protected: bool use_return_type; unsigned return_type; - tinfo_t return_type_tinfo; + return_type_t return_type_tinfo; bool use_remember; unsigned remember_size; @@ -520,7 +520,7 @@ protected: bool is_equal_same_type(const basic & other) const; bool match_same_type(const basic & other) const; unsigned return_type() const; - tinfo_t return_type_tinfo() const; + return_type_t return_type_tinfo() const; // new virtual functions which can be overridden by derived classes // none @@ -739,11 +739,14 @@ function_options& function_options::series_func(series_funcp_exvector s) return *this; } -function_options & function_options::set_return_type(unsigned rt, tinfo_t rtt) +function_options & function_options::set_return_type(unsigned rt, const return_type_t* rtt) { use_return_type = true; return_type = rt; - return_type_tinfo = rtt; + if (rtt != 0) + return_type_tinfo = *rtt; + else + return_type_tinfo = make_return_type_t(); return *this; } @@ -1258,7 +1261,7 @@ unsigned function::return_type() const } } -tinfo_t function::return_type_tinfo() const +return_type_t function::return_type_tinfo() const { GINAC_ASSERT(serial(); else return seq.begin()->return_type_tinfo(); }