~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/ascii/ascii.cc

  • Committer: Jay Pipes
  • Date: 2009-09-15 21:01:42 UTC
  • mto: (1126.2.5 merge)
  • mto: This revision was merged to the branch mainline in revision 1128.
  • Revision ID: jpipes@serialcoder-20090915210142-x8mwiqn1q0vzjspp
Moves Alter_info out into its own header and source file, cleans up some related include mess in sql_lex.h, and renames Alter_info to AlterInfo.

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
 
 
22
 
#include <drizzled/plugin.h>
 
20
#include <drizzled/server_includes.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);
77
 
  return 0;
78
 
}
79
 
 
80
 
DRIZZLE_DECLARE_PLUGIN
81
 
{
82
 
  DRIZZLE_VERSION_ID,
 
74
  registry.function.add(asciiudf);
 
75
  return 0;
 
76
}
 
77
 
 
78
static int finalize(plugin::Registry &registry)
 
79
{
 
80
  registry.function.remove(asciiudf);
 
81
  delete asciiudf;
 
82
  return 0;
 
83
}
 
84
 
 
85
drizzle_declare_plugin(ascii)
 
86
{
83
87
  "ascii",
84
88
  "1.0",
85
89
  "Devananda van der Veen",
86
90
  "Return the ASCII value of a character",
87
91
  PLUGIN_LICENSE_GPL,
88
92
  initialize, /* Plugin Init */
89
 
  NULL,   /* depends */
 
93
  finalize,   /* Plugin Deinit */
 
94
  NULL,   /* status variables */
 
95
  NULL,   /* system variables */
90
96
  NULL    /* config options */
91
97
}
92
 
DRIZZLE_DECLARE_PLUGIN_END;
 
98
drizzle_declare_plugin_end;