~stewart/drizzle/skeleton-embedded-innodb-engine

« back to all changes in this revision

Viewing changes to plugin/charlength/charlength.cc

  • Committer: Stewart Smith
  • Date: 2010-03-30 13:08:38 UTC
  • mfrom: (1283.2.128 staging)
  • Revision ID: stewart@flamingspork.com-20100330130838-3xwqpo06rrqcmxkg
merge trunk

Show diffs side-by-side

added added

removed removed

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