From c4da34c70ce1b9e3803317ebfe48b162cf9d3408 Mon Sep 17 00:00:00 2001 From: Jens Vollinga Date: Fri, 31 Jul 2009 14:41:08 +0200 Subject: [PATCH] Fixed dirty hack in parser to distinguish between serial numbers and pointers. --- ginac/parser/parser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ginac/parser/parser.cpp b/ginac/parser/parser.cpp index 32802316..d639bfe1 100644 --- a/ginac/parser/parser.cpp +++ b/ginac/parser/parser.cpp @@ -68,14 +68,14 @@ ex parser::parse_identifier_expr() } // dirty hack to distinguish between serial numbers of functions and real // pointers. - ex ret; try { - ret = GiNaC::function(reinterpret_cast(reader->second), args); + GiNaC::function f(reinterpret_cast(reader->second), args); + return f; } catch ( std::runtime_error ) { - ret = reader->second(args); + ex ret = reader->second(args); + return ret; } - return ret; } /// paren_expr: '(' expression ')' -- 2.41.0