~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <config.h>
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;