~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/year.cc

  • Committer: Monty Taylor
  • Date: 2010-02-04 08:14:46 UTC
  • mfrom: (1277.2.1 build) (1280.2.1 build)
  • mto: This revision was merged to the branch mainline in revision 1283.
  • Revision ID: mordred@inaugust.com-20100204081446-ldh9m486va30uap6
Put everything in drizzled into drizzled namespace.
Put internal stuff into drizzled::internal namespace.
Removed some cruft.
Now every symbol that is shipped in a header is in the drizzled namespace
and everything in the server that's not shipped is labeled internal. woot. 
Removed a lot of the extra extern "C" stuff that was in there. Less ugliness for
internal callbacks now for Sun Studio.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "config.h"
21
 
#include CSTDINT_H
 
21
 
22
22
#include "drizzled/temporal.h"
23
23
#include "drizzled/error.h"
24
24
#include "drizzled/function/time/year.h"
25
25
 
 
26
namespace drizzled
 
27
{
 
28
 
26
29
int64_t Item_func_year::val_int()
27
30
{
28
31
  assert(fixed);
35
38
  }
36
39
 
37
40
  /* Grab the first argument as a DateTime object */
38
 
  drizzled::DateTime temporal;
 
41
  DateTime temporal;
39
42
  Item_result arg0_result_type= args[0]->result_type();
40
43
  
41
44
  switch (arg0_result_type)
100
103
  }
101
104
 
102
105
  /* Grab the first argument as a DateTime object */
103
 
  drizzled::DateTime temporal;
 
106
  DateTime temporal;
104
107
  
105
108
  if (! temporal.from_int64_t(args[0]->val_int()))
106
109
  {
127
130
  return (int64_t) temporal.years();
128
131
}
129
132
 
 
133
} /* namespace drizzled */