| 127 | -------------------------------------------------------------------------*/ |
| 128 | |
| 129 | inline void |
| 130 | Arena::str_free(char *str) |
| 131 | { |
| 132 | unsigned char *p, *s, *e; |
| 133 | size_t len; |
| 134 | |
| 135 | e = reinterpret_cast<unsigned char *>(str); |
| 136 | s = e - 1; |
| 137 | |
| 138 | while (*s >= 128) { |
| 139 | s -= 1; |
| 140 | } |
| 141 | |
| 142 | p = s; |
| 143 | |
| 144 | len = *s++; |
| 145 | while (s != e) { |
| 146 | len = (len * 128) + (255 - *s++); |
| 147 | } |
| 148 | |
| 149 | len += (e - p) + 1; |
| 150 | free(p, len); |
| 151 | } |
| 152 | |
| 153 | /*------------------------------------------------------------------------- |
| 154 | -------------------------------------------------------------------------*/ |
no outgoing calls
no test coverage detected