X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fsymbol.cpp;h=9897bb4c3b5de35d2344ae90d13bd08d134d247b;hb=df823d53c56c762072f534c9f24479090162e33a;hp=cb33de7f964342699e2cc017bbdfbc181c5a2c76;hpb=1602530f716ba1d425a0667b897182b99c374823;p=ginac.git diff --git a/ginac/symbol.cpp b/ginac/symbol.cpp index cb33de7f..9897bb4c 100644 --- a/ginac/symbol.cpp +++ b/ginac/symbol.cpp @@ -3,7 +3,7 @@ * Implementation of GiNaC's symbolic objects. */ /* - * GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2010 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,6 +25,7 @@ #include "archive.h" #include "tostring.h" #include "utils.h" +#include "hash_seed.h" #include "inifcns.h" #include @@ -253,8 +254,8 @@ bool symbol::is_equal_same_type(const basic & other) const unsigned symbol::calchash() const { - const void* this_tinfo = (const void*)typeid(*this).name(); - hashvalue = golden_ratio_hash((p_int)this_tinfo ^ serial); + unsigned seed = make_hash_seed(typeid(*this)); + hashvalue = golden_ratio_hash(seed ^ serial); setflag(status_flags::hash_calculated); return hashvalue; }