~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to plugin/hex_functions/hex_functions.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-04-17 01:38:47 UTC
  • mfrom: (1237.9.238 bad-staging)
  • Revision ID: osullivan.padraig@gmail.com-20100417013847-ibjioqsfbmf5yg4g
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
165
165
plugin::Create_function<HexFunction> *hex_function= NULL;
166
166
plugin::Create_function<UnHexFunction> *unhex_function= NULL;
167
167
 
168
 
static int initialize(drizzled::plugin::Registry &registry)
 
168
static int initialize(drizzled::plugin::Context &context)
169
169
{
170
170
  hex_function= new plugin::Create_function<HexFunction>("hex");
171
171
  unhex_function= new plugin::Create_function<UnHexFunction>("unhex");
172
 
  registry.add(hex_function);
173
 
  registry.add(unhex_function);
 
172
  context.add(hex_function);
 
173
  context.add(unhex_function);
174
174
  return 0;
175
175
}
176
176
 
177
 
static int finalize(drizzled::plugin::Registry &registry)
178
 
{
179
 
   registry.remove(hex_function);
180
 
   registry.remove(unhex_function);
181
 
   delete hex_function;
182
 
   delete unhex_function;
183
 
   return 0;
184
 
}
185
 
 
186
177
DRIZZLE_DECLARE_PLUGIN
187
178
{
188
179
  DRIZZLE_VERSION_ID,
192
183
  "Convert a string to HEX() or from UNHEX()",
193
184
  PLUGIN_LICENSE_GPL,
194
185
  initialize, /* Plugin Init */
195
 
  finalize,   /* Plugin Deinit */
196
186
  NULL,   /* system variables */
197
187
  NULL    /* config options */
198
188
}