~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item.h

  • Committer: Monty Taylor
  • Date: 2008-11-02 03:17:55 UTC
  • mto: (520.4.45 devel)
  • mto: This revision was merged to the branch mainline in revision 573.
  • Revision ID: monty@inaugust.com-20081102031755-cpzp7dlqoa7rcs1v
Removed a bunch of unusued tests and defines from autoconf.
Fixed the way we were doing cmath - and moved it out of global.h. Still probably
isn't right for Sun Studio, but we're getting closer I think.

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
  { val->real/= uint64_t2double(u); }
169
169
 
170
170
  virtual int64_t val_int(Hybrid_type *val,
171
 
                           bool unsigned_flag __attribute__((unused))) const
172
 
  { return (int64_t) rint(val->real); }
 
171
                          bool unsigned_flag) const;
173
172
  virtual double val_real(Hybrid_type *val) const { return val->real; }
174
173
  virtual my_decimal *val_decimal(Hybrid_type *val, my_decimal *buf) const;
175
174
  virtual String *val_str(Hybrid_type *val, String *buf, uint8_t decimals) const;
1517
1516
  enum Type type() const { return REAL_ITEM; }
1518
1517
  enum_field_types field_type() const { return DRIZZLE_TYPE_DOUBLE; }
1519
1518
  double val_real() { assert(fixed == 1); return value; }
1520
 
  int64_t val_int()
1521
 
  {
1522
 
    assert(fixed == 1);
1523
 
    if (value <= (double) INT64_MIN)
1524
 
    {
1525
 
       return INT64_MIN;
1526
 
    }
1527
 
    else if (value >= (double) (uint64_t) INT64_MAX)
1528
 
    {
1529
 
      return INT64_MAX;
1530
 
    }
1531
 
    return (int64_t) rint(value);
1532
 
  }
 
1519
  int64_t val_int();
1533
1520
  String *val_str(String*);
1534
1521
  my_decimal *val_decimal(my_decimal *);
1535
1522
  bool basic_const_item() const { return 1; }