~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/function.cc

  • Committer: Olaf van der Spek
  • Date: 2011-02-28 14:09:50 UTC
  • mfrom: (2207 bootstrap)
  • mto: (2209.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2210.
  • Revision ID: olafvdspek@gmail.com-20110228140950-2nu0hyzhuww3wssx
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
  std::pair<UdfMap::iterator, bool> ret=
61
61
    udf_registry.insert(make_pair(udf->getName(), udf));
 
62
 
62
63
  if (ret.second == false)
63
64
  {
64
65
    errmsg_printf(error::ERROR,
75
76
  udf_registry.erase(udf->getName());
76
77
}
77
78
 
78
 
const plugin::Function *plugin::Function::get(const char *name, size_t length)
 
79
const plugin::Function *plugin::Function::get(const std::string &name)
79
80
{
80
 
  UdfMap::mapped_type* i= find_ptr(udf_registry, std::string(name, length));
81
 
  return i ? *i : NULL;
 
81
  UdfMap::mapped_type* ptr= find_ptr(udf_registry, name);
 
82
  return ptr ? *ptr : NULL;
82
83
}
83
84
 
84
85
} /* namespace drizzled */