~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to plugin/compression/compressionudf.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-04-17 01:38:47 UTC
  • mfrom: (1237.9.238 bad-staging)
  • Revision ID: osullivan.padraig@gmail.com-20100417013847-ibjioqsfbmf5yg4g
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
plugin::Create_function<Item_func_uncompressed_length>
29
29
  *uncompressed_lengthudf= NULL;
30
30
 
31
 
static int compressionudf_plugin_init(plugin::Registry &registry)
 
31
static int compressionudf_plugin_init(plugin::Context &context)
32
32
{
33
33
  compressudf= new plugin::Create_function<Item_func_compress>("compress");
34
34
  uncompressudf=
35
35
    new plugin::Create_function<Item_func_uncompress>("uncompress");
36
36
  uncompressed_lengthudf=
37
37
    new plugin::Create_function<Item_func_uncompressed_length>("uncompressed_length");
38
 
  registry.add(compressudf);
39
 
  registry.add(uncompressudf);
40
 
  registry.add(uncompressed_lengthudf);
41
 
  return 0;
42
 
}
43
 
 
44
 
static int compressionudf_plugin_deinit(plugin::Registry &registry)
45
 
{
46
 
  registry.remove(compressudf);
47
 
  registry.remove(uncompressudf);
48
 
  registry.remove(uncompressed_lengthudf);
49
 
  delete compressudf;
50
 
  delete uncompressudf;
51
 
  delete uncompressed_lengthudf;
 
38
  context.add(compressudf);
 
39
  context.add(uncompressudf);
 
40
  context.add(uncompressed_lengthudf);
52
41
  return 0;
53
42
}
54
43
 
61
50
  "UDFs for compression functions",
62
51
  PLUGIN_LICENSE_GPL,
63
52
  compressionudf_plugin_init, /* Plugin Init */
64
 
  compressionudf_plugin_deinit, /* Plugin Deinit */
65
53
  NULL,   /* system variables */
66
54
  NULL    /* config options */
67
55
}