#include "debug.h"
#include "mul.h"
#include "constant.h"
+#include "function.h"
#include <sstream>
#include <stdexcept>
Parse_error_("no function \"" << name << "\" with " <<
args.size() << " arguments");
}
- ex ret = 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 ')'