~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/alloc_buffer.cc

  • Committer: Olaf van der Spek
  • Date: 2011-04-14 21:56:22 UTC
  • mto: (2279.1.1 build) (2280.2.2 build)
  • mto: This revision was merged to the branch mainline in revision 2280.
  • Revision ID: olafvdspek@gmail.com-20110414215622-5b590ajxlwqqiyi0
Return void

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include <drizzled/function/str/alloc_buffer.h>
23
23
 
24
 
namespace drizzled
25
 
{
 
24
namespace drizzled {
26
25
 
27
26
String* alloc_buffer(String *res,String *str,String *tmp_value,
28
27
                            ulong length)
35
34
      str->length(length);
36
35
      return str;
37
36
    }
38
 
    if (tmp_value->alloc(length))
39
 
      return 0;
 
37
    tmp_value->alloc(length);
40
38
    (void) tmp_value->copy(*res);
41
39
    tmp_value->length(length);
42
40
    return tmp_value;