~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cache_str.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-07 20:12:20 UTC
  • mto: (934.3.2 mordred)
  • mto: This revision was merged to the branch mainline in revision 938.
  • Revision ID: osullivan.padraig@gmail.com-20090307201220-u9r93y0knyyb8ggy
Cleaning up my function object a little bit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
21
 
 
 
20
#include <drizzled/server_includes.h>
 
21
#include CSTDINT_H
22
22
#include <drizzled/item/cache_str.h>
23
 
#include <drizzled/field.h>
24
 
 
25
 
namespace drizzled
26
 
{
27
23
 
28
24
Item_cache_str::Item_cache_str(const Item *item) :
29
25
  Item_cache(), value(0),
77
73
    return (int64_t)0;
78
74
}
79
75
 
80
 
type::Decimal *Item_cache_str::val_decimal(type::Decimal *decimal_val)
 
76
my_decimal *Item_cache_str::val_decimal(my_decimal *decimal_val)
81
77
{
82
78
  assert(fixed == 1);
83
79
  if (value)
84
 
    decimal_val->store(E_DEC_FATAL_ERROR, value);
 
80
    string2my_decimal(E_DEC_FATAL_ERROR, value, decimal_val);
85
81
  else
86
82
    decimal_val= 0;
87
83
  return decimal_val;
94
90
  return res;
95
91
}
96
92
 
97
 
} /* namespace drizzled */
 
93
 
 
94