~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_alloc.cc

  • Committer: Monty Taylor
  • Date: 2008-11-07 00:37:57 UTC
  • mfrom: (575.3.1 c++ize)
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: monty@inaugust.com-20081107003757-ahi7yycs9t23sima
MergedĀ fromĀ c++ize.

Show diffs side-by-side

added added

removed removed

Lines of Context:
388
388
char *strmake_root(MEM_ROOT *root, const char *str, size_t len)
389
389
{
390
390
  char *pos;
391
 
  if ((pos=alloc_root(root,len+1)))
 
391
  if ((pos=(char *)alloc_root(root,len+1)))
392
392
  {
393
393
    memcpy(pos,str,len);
394
394
    pos[len]=0;
399
399
 
400
400
void *memdup_root(MEM_ROOT *root, const void *str, size_t len)
401
401
{
402
 
  char *pos;
 
402
  void *pos;
403
403
  if ((pos=alloc_root(root,len)))
404
404
    memcpy(pos,str,len);
405
405
  return pos;