ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/utils.C
(Generate patch)

Comparing deliantra/server/common/utils.C (file contents):
Revision 1.24 by root, Sat Dec 16 21:40:26 2006 UTC vs.
Revision 1.25 by root, Sun Dec 17 23:10:34 2006 UTC

557 assert (!rc_next); 557 assert (!rc_next);
558 assert (!refcnt); 558 assert (!refcnt);
559} 559}
560#endif 560#endif
561 561
562void *salloc (int size) throw (std::bad_alloc) 562void *salloc_ (int n) throw (std::bad_alloc)
563{ 563{
564 void *ptr = g_slice_alloc (size); 564 void *ptr = g_slice_alloc (n);
565 565
566 if (!ptr) 566 if (!ptr)
567 throw std::bad_alloc (); 567 throw std::bad_alloc ();
568 568
569 return ptr; 569 return ptr;
570} 570}
571 571
572void *salloc (int size, void *src) throw (std::bad_alloc) 572void *salloc_ (int n, void *src) throw (std::bad_alloc)
573{ 573{
574 void *ptr = salloc (size); 574 void *ptr = salloc_ (n);
575 575
576 if (src) 576 if (src)
577 memcpy (ptr, src, size); 577 memcpy (ptr, src, n);
578 else 578 else
579 memset (ptr, 0, size); 579 memset (ptr, 0, n);
580 580
581 return ptr; 581 return ptr;
582} 582}
583 583
584void assign (char *dst, const char *src, int maxlen) 584void assign (char *dst, const char *src, int maxlen)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines