~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/substr_functions/substr_functions.cc

Merge Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
plugin::Create_function<SubstrFunction> *substr_function= NULL;
259
259
plugin::Create_function<SubstrIndexFunction> *substr_index_function= NULL;
260
260
 
261
 
static int initialize(drizzled::plugin::Registry &registry)
 
261
static int initialize(drizzled::plugin::Context &context)
262
262
{
263
263
  substr_function= new plugin::Create_function<SubstrFunction>("substr");
264
264
  substr_index_function= new plugin::Create_function<SubstrIndexFunction>("substring_index");
265
 
  registry.add(substr_function);
266
 
  registry.add(substr_index_function);
 
265
  context.add(substr_function);
 
266
  context.add(substr_index_function);
267
267
  return 0;
268
268
}
269
269
 
270
 
static int finalize(drizzled::plugin::Registry &registry)
271
 
{
272
 
   registry.remove(substr_function);
273
 
   registry.remove(substr_index_function);
274
 
   delete substr_function;
275
 
   delete substr_index_function;
276
 
   return 0;
277
 
}
278
 
 
279
270
DRIZZLE_DECLARE_PLUGIN
280
271
{
281
272
  DRIZZLE_VERSION_ID,
285
276
  "SUBSTR and SUBSTR",
286
277
  PLUGIN_LICENSE_GPL,
287
278
  initialize, /* Plugin Init */
288
 
  finalize,   /* Plugin Deinit */
289
279
  NULL,   /* system variables */
290
280
  NULL    /* config options */
291
281
}