Parse_error_("no function \"" << name << "\" with " <<
args.size() << " arguments");
}
- ex ret = GiNaC::function(reinterpret_cast<unsigned>(reader->second), args);
- return ret;
+ // dirty hack to distinguish between serial numbers of functions and real
+ // pointers.
+ try {
+ GiNaC::function f(reinterpret_cast<unsigned>(reader->second), args);
+ return f;
+ }
+ catch ( std::runtime_error ) {
+ ex ret = reader->second(args);
+ return ret;
+ }
}
/// paren_expr: '(' expression ')'