~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/hex_functions/hex_functions.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

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::module::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
}