]> www.ginac.de Git - cln.git/blobdiff - src/rational/misc/cl_RA_eqhashcode.cc
Remove internal inline versions of numerator/denominator(cl_RA).
[cln.git] / src / rational / misc / cl_RA_eqhashcode.cc
index 8e54c8520351b19a491d27fa66b79a1b42cfc7bd..daae04fc0fef4822f64870a385978cb38bd94b80 100644 (file)
@@ -1,7 +1,7 @@
 // cl_RA equal_hashcode().
 
 // General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
 
 // Specification.
 #include "cln/rational.h"
@@ -9,23 +9,25 @@
 
 // Implementation.
 
-#include "cl_N.h"
-#include "cl_RA.h"
+#include "base/cl_N.h"
+#include "rational/cl_RA.h"
+#include "base/cl_inline.h"
+#include "integer/misc/cl_I_eqhashcode.cc"
 
 namespace cln {
 
-uint32 equal_hashcode (const cl_RA& r)
+CL_INLINE2 uint32 CL_INLINE2_DECL(equal_hashcode) (const cl_RA& r)
 {
        if (integerp(r)) {
                DeclareType(cl_I,r);
-               return equal_hashcode(r);
+               return equal_hashcode_inline(r);
        } else {
                // Making sure that a float and its rational equivalent have
                // the same hash code is tricky. This code depends on the fact
                // that the equal_hashcode_low macro is linear in `exp'.
                DeclareType(cl_RT,r);
-               return equal_hashcode(numerator(r))
-                      - equal_hashcode(denominator(r))
+               return equal_hashcode_inline(numerator(r))
+                      - equal_hashcode_inline(denominator(r))
                       + equal_hashcode_one;
        }
 }