… | |
… | |
545 | return; |
545 | return; |
546 | } |
546 | } |
547 | |
547 | |
548 | ///////////////////////////////////////////////////////////////////////////// |
548 | ///////////////////////////////////////////////////////////////////////////// |
549 | |
549 | |
|
|
550 | #if 0 |
|
|
551 | refcounted *refcounted::rc_first; |
|
|
552 | |
|
|
553 | refcounted::refcounted () |
|
|
554 | { |
|
|
555 | refcnt = 0; |
|
|
556 | rc_next = rc_first; |
|
|
557 | rc_first = this; |
|
|
558 | } |
|
|
559 | |
|
|
560 | refcounted::~refcounted () |
|
|
561 | { |
|
|
562 | assert (!rc_next); |
|
|
563 | assert (!refcnt); |
|
|
564 | } |
|
|
565 | #endif |
|
|
566 | |
550 | void *alloc (int s) throw (std::bad_alloc) |
567 | void *alloc (int s) throw (std::bad_alloc) |
551 | { |
568 | { |
552 | void *p = g_slice_alloc (s); |
569 | void *p = g_slice_alloc (s); |
553 | |
570 | |
554 | if (!p) |
571 | if (!p) |
… | |
… | |
579 | } |
596 | } |
580 | else |
597 | else |
581 | memcpy (dst, src, len + 1); |
598 | memcpy (dst, src, len + 1); |
582 | } |
599 | } |
583 | |
600 | |
|
|
601 | |