~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/ascii/ascii.cc

Merge Stewart.

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
18
18
 */
19
19
 
20
20
#include "config.h"
21
 
 
22
 
#include <drizzled/plugin.h>
23
21
#include <drizzled/function/math/int.h>
24
22
#include <drizzled/plugin/function.h>
25
23
 
70
68
 
71
69
plugin::Create_function<AsciiFunction> *asciiudf= NULL;
72
70
 
73
 
static int initialize(module::Context &context)
 
71
static int initialize(plugin::Registry &registry)
74
72
{
75
73
  asciiudf= new plugin::Create_function<AsciiFunction>("ascii");
76
 
  context.add(asciiudf);
 
74
  registry.add(asciiudf);
 
75
  return 0;
 
76
}
 
77
 
 
78
static int finalize(plugin::Registry &registry)
 
79
{
 
80
  registry.remove(asciiudf);
 
81
  delete asciiudf;
77
82
  return 0;
78
83
}
79
84
 
86
91
  "Return the ASCII value of a character",
87
92
  PLUGIN_LICENSE_GPL,
88
93
  initialize, /* Plugin Init */
89
 
  NULL,   /* depends */
 
94
  finalize,   /* Plugin Deinit */
 
95
  NULL,   /* system variables */
90
96
  NULL    /* config options */
91
97
}
92
98
DRIZZLE_DECLARE_PLUGIN_END;