]> www.ginac.de Git - cln.git/blobdiff - include/cln/univpoly_real.h
Replace CL_REQUIRE/CL_PROVIDE(cl_I_ring) with portable code.
[cln.git] / include / cln / univpoly_real.h
index 064e73d085a9b7924743639cf8474328645d14ba..7338e94a5b15265f754cd440aa51c47034b30b65 100644 (file)
@@ -53,18 +53,18 @@ public:
        const cl_R operator() (const cl_R& y) const;
 public:        // Ability to place an object at a given address.
        void* operator new (size_t size) { return malloc_hook(size); }
-       void* operator new (size_t size, cl_UP_R* ptr) { (void)size; return ptr; }
+       void* operator new (size_t size, void* ptr) { (void)size; return ptr; }
        void operator delete (void* ptr) { free_hook(ptr); }
 };
 
 class cl_heap_univpoly_real_ring : public cl_heap_univpoly_ring {
        SUBCLASS_cl_heap_univpoly_ring()
        // High-level operations.
-       void fprint (cl_ostream stream, const cl_UP_R& x)
+       void fprint (std::ostream& stream, const cl_UP_R& x)
        {
                cl_heap_univpoly_ring::fprint(stream,x);
        }
-       cl_boolean equal (const cl_UP_R& x, const cl_UP_R& y)
+       bool equal (const cl_UP_R& x, const cl_UP_R& y)
        {
                return cl_heap_univpoly_ring::equal(x,y);
        }
@@ -72,7 +72,7 @@ class cl_heap_univpoly_real_ring : public cl_heap_univpoly_ring {
        {
                return The2(cl_UP_R)(cl_heap_univpoly_ring::zero());
        }
-       cl_boolean zerop (const cl_UP_R& x)
+       bool zerop (const cl_UP_R& x)
        {
                return cl_heap_univpoly_ring::zerop(x);
        }
@@ -116,6 +116,10 @@ class cl_heap_univpoly_real_ring : public cl_heap_univpoly_ring {
        {
                return cl_heap_univpoly_ring::degree(x);
        }
+       sintL ldegree (const cl_UP_R& x)
+       {
+               return cl_heap_univpoly_ring::ldegree(x);
+       }
        const cl_UP_R monomial (const cl_R& x, uintL e)
        {
                return The2(cl_UP_R)(cl_heap_univpoly_ring::monomial(cl_ring_element(cl_R_ring,x),e));
@@ -219,8 +223,6 @@ inline const cl_UP_R deriv (const cl_UP_R& x)
 
 #endif
 
-CL_REQUIRE(cl_R_ring)
-
 }  // namespace cln
 
 #endif /* _CL_UNIVPOLY_REAL_H */