… | |
… | |
4 | #include <new> |
4 | #include <new> |
5 | #include <stdlib.h> |
5 | #include <stdlib.h> |
6 | #include <string.h> |
6 | #include <string.h> |
7 | #include "ecb.h" |
7 | #include "ecb.h" |
8 | #include "estl.h" |
8 | #include "estl.h" |
|
|
9 | |
|
|
10 | #include "emman.h" |
9 | |
11 | |
10 | // increases code size unless -fno-enforce-eh-specs |
12 | // increases code size unless -fno-enforce-eh-specs |
11 | #if __GNUC__ |
13 | #if __GNUC__ |
12 | # define NOTHROW |
14 | # define NOTHROW |
13 | # define THROW(x) |
15 | # define THROW(x) |
… | |
… | |
86 | const T &operator [] (int i) const { return * (const T *) (& ((* (const simplevec<void *> *)this)[i])); } |
88 | const T &operator [] (int i) const { return * (const T *) (& ((* (const simplevec<void *> *)this)[i])); } |
87 | }; |
89 | }; |
88 | #endif |
90 | #endif |
89 | |
91 | |
90 | inline void * |
92 | inline void * |
91 | operator new (size_t size) |
93 | operator new (size_t size) throw (std::bad_alloc) |
92 | { |
94 | { |
93 | // TODO: use rxvt_malloc |
95 | // TODO: use rxvt_malloc |
94 | return malloc (size); |
96 | return malloc (size); |
95 | } |
97 | } |
96 | |
98 | |
97 | inline void |
99 | inline void |
98 | operator delete (void *p) |
100 | operator delete (void *p) throw () |
99 | { |
101 | { |
100 | free (p); |
102 | free (p); |
101 | } |
103 | } |
102 | |
104 | |
103 | template<typename T> |
105 | template<typename T> |