~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/length/length.cc

Merge Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
plugin::Create_function<LengthFunction> *lengthudf= NULL;
66
66
plugin::Create_function<LengthFunction> *octet_lengthudf= NULL;
67
67
 
68
 
static int initialize(drizzled::plugin::Registry &registry)
 
68
static int initialize(drizzled::plugin::Context &context)
69
69
{
70
70
  lengthudf= new plugin::Create_function<LengthFunction>("length");
71
71
  octet_lengthudf= new plugin::Create_function<LengthFunction>("octet_length");
72
 
  registry.add(lengthudf);
73
 
  registry.add(octet_lengthudf);
 
72
  context.add(lengthudf);
 
73
  context.add(octet_lengthudf);
74
74
  return 0;
75
75
}
76
76
 
77
 
static int finalize(drizzled::plugin::Registry &registry)
78
 
{
79
 
   registry.remove(lengthudf);
80
 
   registry.remove(octet_lengthudf);
81
 
   delete lengthudf;
82
 
   delete octet_lengthudf;
83
 
   return 0;
84
 
}
85
 
 
86
77
DRIZZLE_DECLARE_PLUGIN
87
78
{
88
79
  DRIZZLE_VERSION_ID,
92
83
  "Return the byte length of a string",
93
84
  PLUGIN_LICENSE_GPL,
94
85
  initialize, /* Plugin Init */
95
 
  finalize,   /* Plugin Deinit */
96
86
  NULL,   /* system variables */
97
87
  NULL    /* config options */
98
88
}