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

« back to all changes in this revision

Viewing changes to plugin/length/length.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:
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::module::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
}