~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.h

merged with up to date trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
217
217
      char *new_ptr;
218
218
      if (!(new_ptr= reinterpret_cast<char*>(::realloc(Ptr,arg_length))))
219
219
      {
220
 
        Alloced_length = 0;
221
 
        real_alloc(arg_length);
 
220
        Alloced_length = 0;
 
221
        real_alloc(arg_length);
222
222
      }
223
223
      else
224
224
      {
225
 
        Ptr=new_ptr;
226
 
        Alloced_length=arg_length;
 
225
        Ptr=new_ptr;
 
226
        Alloced_length=arg_length;
227
227
      }
228
228
    }
229
229
  }
272
272
    else
273
273
    {
274
274
      if (realloc(str_length+1))
275
 
        return 1;
 
275
        return 1;
276
276
      Ptr[str_length++]=chr;
277
277
    }
278
278
    return 0;
339
339
bool check_if_only_end_space(const CHARSET_INFO * const cs, char *str,
340
340
                             char *end);
341
341
 
 
342
std::ostream& operator<<(std::ostream& output, const String &str);
 
343
 
342
344
} /* namespace drizzled */
343
345
 
344
346
bool operator==(const drizzled::String &s1, const drizzled::String &s2);