diff --git a/ChangeLog b/ChangeLog index 35435f0..fc5e35e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-01-22 Richard Kreckel + + * configure.in: Make build in separate builddir possible (again). + +2001-01-22 Richard Kreckel + + * include/cln/*.h: Change signatures of all classes' methods + cln::cl_foo::operator new(size_t, cl_foo*) to + cln::cl_foo::operator new(size_t, void*) so one can declare + std::vector, std::list etc. for + certain STL implementations (like libstdc++-v3). + 2000-12-14 Richard Kreckel * Version 1.1 released. diff --git a/NEWS b/NEWS index 2102127..c01b99b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +2001-xx-xx, version 1.1.1 +========================= + +Implementation changes +---------------------- + +* Minor cleanup for GCC 3.0. + + 2000-12-14, version 1.1.0 ========================= diff --git a/include/cln/GV.h b/include/cln/GV.h index 6616c52..cd31e6d 100644 --- a/include/cln/GV.h +++ b/include/cln/GV.h @@ -44,7 +44,7 @@ public: // Destructor. ~cl_GV_inner (); // Ability to place an object at a given address. - void* operator new (size_t size, cl_GV_inner* ptr) { (void)size; return ptr; } + void* operator new (size_t size, void* ptr) { (void)size; return ptr; } private: // No default constructor, copy constructor, assignment operator, new. cl_GV_inner (); diff --git a/include/cln/SV.h b/include/cln/SV.h index 43ae0dc..ad0bf19 100644 --- a/include/cln/SV.h +++ b/include/cln/SV.h @@ -81,7 +81,7 @@ public: // Destructor. ~cl_SV_inner (); // Ability to place an object at a given address. - void* operator new (size_t size, cl_SV_inner* ptr) { (void)size; return ptr; } + void* operator new (size_t size, void* ptr) { (void)size; return ptr; } private: // No default constructor, copy constructor, assignment operator, new. cl_SV_inner (); diff --git a/include/cln/complex_class.h b/include/cln/complex_class.h index 0f4b3c1..b5dec56 100644 --- a/include/cln/complex_class.h +++ b/include/cln/complex_class.h @@ -36,7 +36,7 @@ public: cl_N (struct cl_heap_complex *); 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_N* 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); } private: // Friend declarations. They are for the compiler. Just ignore them. diff --git a/include/cln/dfloat_class.h b/include/cln/dfloat_class.h index f36f80f..515fb37 100644 --- a/include/cln/dfloat_class.h +++ b/include/cln/dfloat_class.h @@ -31,7 +31,7 @@ public: operator struct cl_heap_dfloat * () 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_DF* 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); } private: // Friend declarations. They are for the compiler. Just ignore them. diff --git a/include/cln/ffloat_class.h b/include/cln/ffloat_class.h index aaa2481..94cbfd8 100644 --- a/include/cln/ffloat_class.h +++ b/include/cln/ffloat_class.h @@ -39,7 +39,7 @@ public: #endif 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_FF* 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); } }; diff --git a/include/cln/float_class.h b/include/cln/float_class.h index 7a7e955..61c5e37 100644 --- a/include/cln/float_class.h +++ b/include/cln/float_class.h @@ -28,7 +28,7 @@ public: cl_F (cl_private_thing); 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_F* 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); } private: // Friend declarations. They are for the compiler. Just ignore them. diff --git a/include/cln/integer_class.h b/include/cln/integer_class.h index ebf9b6e..db2068e 100644 --- a/include/cln/integer_class.h +++ b/include/cln/integer_class.h @@ -33,7 +33,7 @@ public: cl_I (struct cl_heap_bignum *); 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_I* 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); } }; diff --git a/include/cln/lfloat_class.h b/include/cln/lfloat_class.h index 6d719d0..e73f0a1 100644 --- a/include/cln/lfloat_class.h +++ b/include/cln/lfloat_class.h @@ -28,7 +28,7 @@ public: operator struct cl_heap_lfloat * () 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_LF* 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); } }; // Define this if you want the elementary cl_LF operations (+, -, *, /, diff --git a/include/cln/modinteger.h b/include/cln/modinteger.h index c1823ab..cc613be 100644 --- a/include/cln/modinteger.h +++ b/include/cln/modinteger.h @@ -103,7 +103,7 @@ public: CL_DEFINE_CONVERTER(_cl_ring_element) 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_MI* 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); } }; @@ -125,7 +125,7 @@ public: void debug_print () 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_MI* 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); } }; diff --git a/include/cln/object.h b/include/cln/object.h index fb509bd..02dd64e 100644 --- a/include/cln/object.h +++ b/include/cln/object.h @@ -335,7 +335,7 @@ public: // Debugging output. void debug_print () const; // Ability to place an object at a given address. - void* operator new (size_t size, cl_gcobject* ptr) { (void)size; return ptr; } + void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void* operator new (size_t size) { return ::operator new (size); } }; inline cl_gcobject::cl_gcobject () {} @@ -385,7 +385,7 @@ public: // Debugging output. void debug_print () const; // Ability to place an object at a given address. - void* operator new (size_t size, cl_gcpointer* ptr) { (void)size; return ptr; } + void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void* operator new (size_t size) { return ::operator new (size); } }; inline cl_gcpointer::cl_gcpointer () {} @@ -435,7 +435,7 @@ public: // Debugging output. void debug_print () const; // Ability to place an object at a given address. - void* operator new (size_t size, cl_rcobject* ptr) { (void)size; return ptr; } + void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void* operator new (size_t size) { return ::operator new (size); } }; inline cl_rcobject::cl_rcobject () {} @@ -485,7 +485,7 @@ public: // Debugging output. void debug_print () const; // Ability to place an object at a given address. - void* operator new (size_t size, cl_rcpointer* ptr) { (void)size; return ptr; } + void* operator new (size_t size, void* ptr) { (void)size; return ptr; } void* operator new (size_t size) { return ::operator new (size); } }; inline cl_rcpointer::cl_rcpointer () {} diff --git a/include/cln/rational_class.h b/include/cln/rational_class.h index 93470f1..3546598 100644 --- a/include/cln/rational_class.h +++ b/include/cln/rational_class.h @@ -33,7 +33,7 @@ public: cl_RA (struct cl_heap_ratio *); 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_RA* 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); } private: // Friend declarations. They are for the compiler. Just ignore them. diff --git a/include/cln/real_class.h b/include/cln/real_class.h index 41c0c51..bae1e51 100644 --- a/include/cln/real_class.h +++ b/include/cln/real_class.h @@ -36,7 +36,7 @@ public: cl_R (cl_private_thing); 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_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); } private: // Friend declarations. They are for the compiler. Just ignore them. diff --git a/include/cln/ring.h b/include/cln/ring.h index 69c621c..70b6120 100644 --- a/include/cln/ring.h +++ b/include/cln/ring.h @@ -121,7 +121,7 @@ public: /* ugh */ _cl_ring_element (const cl_ring& R, const cl_gcobject& r) : rep (as_cl_private_thing(r)) { (void)R; } 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_ring_element* 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); } }; @@ -140,7 +140,7 @@ public: // Debugging output. void debug_print () const; // 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_ring_element* 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); } }; diff --git a/include/cln/sfloat_class.h b/include/cln/sfloat_class.h index 9032e15..57266fc 100644 --- a/include/cln/sfloat_class.h +++ b/include/cln/sfloat_class.h @@ -26,7 +26,7 @@ public: cl_SF (struct cl_sfloat * /* NULL! */, cl_uint); 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_SF* 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); } }; diff --git a/include/cln/univpoly.h b/include/cln/univpoly.h index d1a173b..bfc88ac 100644 --- a/include/cln/univpoly.h +++ b/include/cln/univpoly.h @@ -72,7 +72,7 @@ public: CL_DEFINE_CONVERTER(_cl_ring_element) 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* 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); } }; @@ -102,7 +102,7 @@ public: void debug_print () 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* 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); } }; @@ -523,7 +523,7 @@ public: const T operator() (const T& 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_specialized* 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); } }; diff --git a/include/cln/univpoly_complex.h b/include/cln/univpoly_complex.h index 8deab19..5de6dac 100644 --- a/include/cln/univpoly_complex.h +++ b/include/cln/univpoly_complex.h @@ -53,7 +53,7 @@ public: const cl_N operator() (const cl_N& 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_N* 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); } }; diff --git a/include/cln/univpoly_integer.h b/include/cln/univpoly_integer.h index 16b704e..d227fa5 100644 --- a/include/cln/univpoly_integer.h +++ b/include/cln/univpoly_integer.h @@ -52,7 +52,7 @@ public: const cl_I operator() (const cl_I& 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_I* 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); } }; diff --git a/include/cln/univpoly_modint.h b/include/cln/univpoly_modint.h index b603e8e..4fcd1cd 100644 --- a/include/cln/univpoly_modint.h +++ b/include/cln/univpoly_modint.h @@ -43,7 +43,7 @@ public: const cl_MI operator() (const cl_MI& 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_MI* 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); } }; diff --git a/include/cln/univpoly_rational.h b/include/cln/univpoly_rational.h index fe76e23..0c53590 100644 --- a/include/cln/univpoly_rational.h +++ b/include/cln/univpoly_rational.h @@ -53,7 +53,7 @@ public: const cl_RA operator() (const cl_RA& 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_RA* 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); } }; diff --git a/include/cln/univpoly_real.h b/include/cln/univpoly_real.h index 742b373..4f2419f 100644 --- a/include/cln/univpoly_real.h +++ b/include/cln/univpoly_real.h @@ -53,7 +53,7 @@ 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); } };