From: Jens Vollinga Date: Fri, 31 Jul 2009 13:29:17 +0000 (+0200) Subject: Fixed the fix in commit f059ebe117d15292e0d262e6e8e232e835c7e33c. X-Git-Tag: release_1-5-4~17 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=7a092f6f6256bac2e5b7c35222fe7e18ca980401 Fixed the fix in commit f059ebe117d15292e0d262e6e8e232e835c7e33c. --- diff --git a/ginac/parser/parser.cpp b/ginac/parser/parser.cpp index 8f663d18..81820316 100644 --- a/ginac/parser/parser.cpp +++ b/ginac/parser/parser.cpp @@ -68,14 +68,15 @@ ex parser::parse_identifier_expr() } // dirty hack to distinguish between serial numbers of functions and real // pointers. + GiNaC::function* f; try { - GiNaC::function f(reinterpret_cast(reader->second), args); - return f; + f = new GiNaC::function(reinterpret_cast(reader->second), args); } catch ( std::runtime_error ) { ex ret = reader->second(args); return ret; } + return f->setflag(status_flags::dynallocated); } /// paren_expr: '(' expression ')'