]> www.ginac.de Git - ginac.git/blobdiff - ginac/function.pl
Changed the parser such that it understands all defined functions
[ginac.git] / ginac / function.pl
index 31f8ba5ecf3c02ee620eb0105ee23a5c10717926..af14a753ee1530fe55c0f214e920111a35959415 100644 (file)
@@ -536,6 +536,7 @@ public:
        static unsigned register_new(function_options const & opt);
        static unsigned current_serial;
        static unsigned find_function(const std::string &name, unsigned nparams);
+       static std::vector<function_options> get_registered_functions() { return registered_functions(); };
        unsigned get_serial() const {return serial;}
        std::string get_name() const;
 
@@ -603,6 +604,7 @@ $implementation=<<END_OF_IMPLEMENTATION;
 #include "inifcns.h"
 #include "tostring.h"
 #include "utils.h"
+#include "hash_seed.h"
 #include "remember.h"
 
 #include <iostream>
@@ -1062,8 +1064,7 @@ ex function::eval_ncmul(const exvector & v) const
 
 unsigned function::calchash() const
 {
-       const void* this_tinfo = (const void*)typeid(*this).name();
-       unsigned v = golden_ratio_hash(golden_ratio_hash((p_int)this_tinfo) ^ serial);
+       unsigned v = golden_ratio_hash(make_hash_seed(typeid(*this)) ^ serial);
        for (size_t i=0; i<nops(); i++) {
                v = rotate_left(v);
                v ^= this->op(i).gethash();