Browse Source

* include/cln/number.h (As): Fix it in namespace by suffixing `_As'

to the appropiate method instead of prefixing `as_'.
        * src/complex/misc/cl_N_as.cc (cl_N_As): Likewise.
        * src/real/misc/cl_R_as.cc (cl_R_As): Likewise.
        * src/rational/misc/cl_RA_as.cc (cl_RA_As): Likewise.
        * src/integer/misc/cl_I_as.cc (cl_I_As): Likewise.
        * src/float/misc/cl_F_as.cc (cl_F_As): Likewise.
        * src/float/sfloat/misc/cl_SF_as.cc (cl_SF_As): Likewise.
        * src/float/lfloat/misc/cl_LF_as.cc (cl_LF_As): Likewise.
        * src/float/ffloat/misc/cl_FF_as.cc (cl_FF_As): Likewise.
        * src/float/dfloat/misc/cl_DF_as.cc (cl_DF_As): Likewise.
master
Richard Kreckel 25 years ago
parent
commit
f24a1dab87
  1. 14
      ChangeLog
  2. 12
      include/cln/number.h
  3. 4
      src/complex/misc/cl_N_as.cc
  4. 4
      src/float/dfloat/misc/cl_DF_as.cc
  5. 4
      src/float/ffloat/misc/cl_FF_as.cc
  6. 4
      src/float/lfloat/misc/cl_LF_as.cc
  7. 4
      src/float/misc/cl_F_as.cc
  8. 4
      src/float/sfloat/misc/cl_SF_as.cc
  9. 4
      src/integer/misc/cl_I_as.cc
  10. 4
      src/rational/misc/cl_RA_as.cc
  11. 4
      src/real/misc/cl_R_as.cc

14
ChangeLog

@ -1,3 +1,17 @@
2000-09-05 Richard Kreckel <kreckel@ginac.de>
* include/cln/number.h (As): Fix it in namespace by suffixing `_As'
to the appropiate method instead of prefixing `as_'.
* src/complex/misc/cl_N_as.cc (cl_N_As): Likewise.
* src/real/misc/cl_R_as.cc (cl_R_As): Likewise.
* src/rational/misc/cl_RA_as.cc (cl_RA_As): Likewise.
* src/integer/misc/cl_I_as.cc (cl_I_As): Likewise.
* src/float/misc/cl_F_as.cc (cl_F_As): Likewise.
* src/float/sfloat/misc/cl_SF_as.cc (cl_SF_As): Likewise.
* src/float/lfloat/misc/cl_LF_as.cc (cl_LF_As): Likewise.
* src/float/ffloat/misc/cl_FF_as.cc (cl_FF_As): Likewise.
* src/float/dfloat/misc/cl_DF_as.cc (cl_DF_As): Likewise.
2000-09-05 Richard Kreckel <kreckel@ginac.de>
* src/complex/transcendental/cl_C_expt_C.cc (expt): fix logic for

12
include/cln/number.h

@ -225,16 +225,16 @@ inline const type& the(const cl_number& x)
// As(cl_I)(x) returns x as a cl_I. It first checks that x is a cl_I
// and then returns it without change of representation.
#if 0 // no debug information
#define As(type) as_##type
#define As(type) type##_As
#define CL_DEFINE_AS_CONVERSION(_class_) \
extern const _class_& as_##_class_ (const cl_number& x); \
inline const _class_& as_##_class_ (const _class_& x) { return x; }
extern const _class_& _class_##_As (const cl_number& x); \
inline const _class_& _class_##_As (const _class_& x) { return x; }
#else // Line number information for ease of debugging.
#define As(type) as_##type cl_as_aux
#define As(type) type##_As cl_as_aux
#define cl_as_aux(expr) (expr,__FILE__,__LINE__)
#define CL_DEFINE_AS_CONVERSION(_class_) \
extern const _class_& as_##_class_ (const cl_number& x, const char * filename, int line); \
inline const _class_& as_##_class_ (const _class_& x, const char * filename, int line) { (void)filename; (void)line; return x; }
extern const _class_& _class_##_As (const cl_number& x, const char * filename, int line); \
inline const _class_& _class_##_As (const _class_& x, const char * filename, int line) { (void)filename; (void)line; return x; }
#endif
// Mutable(type,x);

4
src/complex/misc/cl_N_as.cc

@ -1,4 +1,4 @@
// as_cl_N().
// cl_N_As().
// General includes.
#include "cl_sysdep.h"
@ -34,7 +34,7 @@ inline cl_boolean cl_N_p (const cl_number& x)
return cl_false;
}
const cl_N& as_cl_N (const cl_number& x, const char * filename, int line)
const cl_N& cl_N_As (const cl_number& x, const char * filename, int line)
{
if (cl_N_p(x)) {
DeclareType(cl_N,x);

4
src/float/dfloat/misc/cl_DF_as.cc

@ -1,4 +1,4 @@
// as_cl_DF().
// cl_DF_As().
// General includes.
#include "cl_sysdep.h"
@ -21,7 +21,7 @@ inline cl_boolean cl_DF_p (const cl_number& x)
return cl_false;
}
const cl_DF& as_cl_DF (const cl_number& x, const char * filename, int line)
const cl_DF& cl_DF_As (const cl_number& x, const char * filename, int line)
{
if (cl_DF_p(x)) {
DeclareType(cl_DF,x);

4
src/float/ffloat/misc/cl_FF_as.cc

@ -1,4 +1,4 @@
// as_cl_FF().
// cl_FF_As().
// General includes.
#include "cl_sysdep.h"
@ -27,7 +27,7 @@ inline cl_boolean cl_FF_p (const cl_number& x)
return cl_false;
}
const cl_FF& as_cl_FF (const cl_number& x, const char * filename, int line)
const cl_FF& cl_FF_As (const cl_number& x, const char * filename, int line)
{
if (cl_FF_p(x)) {
DeclareType(cl_FF,x);

4
src/float/lfloat/misc/cl_LF_as.cc

@ -1,4 +1,4 @@
// as_cl_LF().
// cl_LF_As().
// General includes.
#include "cl_sysdep.h"
@ -21,7 +21,7 @@ inline cl_boolean cl_LF_p (const cl_number& x)
return cl_false;
}
const cl_LF& as_cl_LF (const cl_number& x, const char * filename, int line)
const cl_LF& cl_LF_As (const cl_number& x, const char * filename, int line)
{
if (cl_LF_p(x)) {
DeclareType(cl_LF,x);

4
src/float/misc/cl_F_as.cc

@ -1,4 +1,4 @@
// as_cl_F().
// cl_F_As().
// General includes.
#include "cl_sysdep.h"
@ -29,7 +29,7 @@ inline cl_boolean cl_F_p (const cl_number& x)
return cl_false;
}
const cl_F& as_cl_F (const cl_number& x, const char * filename, int line)
const cl_F& cl_F_As (const cl_number& x, const char * filename, int line)
{
if (cl_F_p(x)) {
DeclareType(cl_F,x);

4
src/float/sfloat/misc/cl_SF_as.cc

@ -1,4 +1,4 @@
// as_cl_SF().
// cl_SF_As().
// General includes.
#include "cl_sysdep.h"
@ -21,7 +21,7 @@ inline cl_boolean cl_SF_p (const cl_number& x)
return cl_false;
}
const cl_SF& as_cl_SF (const cl_number& x, const char * filename, int line)
const cl_SF& cl_SF_As (const cl_number& x, const char * filename, int line)
{
if (cl_SF_p(x)) {
DeclareType(cl_SF,x);

4
src/integer/misc/cl_I_as.cc

@ -1,4 +1,4 @@
// as_cl_I().
// cl_I_As().
// General includes.
#include "cl_sysdep.h"
@ -30,7 +30,7 @@ inline cl_boolean cl_I_p (const cl_number& x)
return cl_false;
}
const cl_I& as_cl_I (const cl_number& x, const char * filename, int line)
const cl_I& cl_I_As (const cl_number& x, const char * filename, int line)
{
if (cl_I_p(x)) {
DeclareType(cl_I,x);

4
src/rational/misc/cl_RA_as.cc

@ -1,4 +1,4 @@
// as_cl_RA().
// cl_RA_As().
// General includes.
#include "cl_sysdep.h"
@ -30,7 +30,7 @@ inline cl_boolean cl_RA_p (const cl_number& x)
return cl_false;
}
const cl_RA& as_cl_RA (const cl_number& x, const char * filename, int line)
const cl_RA& cl_RA_As (const cl_number& x, const char * filename, int line)
{
if (cl_RA_p(x)) {
DeclareType(cl_RA,x);

4
src/real/misc/cl_R_as.cc

@ -1,4 +1,4 @@
// as_cl_R().
// cl_R_As().
// General includes.
#include "cl_sysdep.h"
@ -34,7 +34,7 @@ inline cl_boolean cl_R_p (const cl_number& x)
return cl_false;
}
const cl_R& as_cl_R (const cl_number& x, const char * filename, int line)
const cl_R& cl_R_As (const cl_number& x, const char * filename, int line)
{
if (cl_R_p(x)) {
DeclareType(cl_R,x);

Loading…
Cancel
Save