| 23 | } |
| 24 | |
| 25 | void SharedString::init(const char* _begin, const char* _end) |
| 26 | { |
| 27 | ptr = new char[_end - _begin + 9]; |
| 28 | *(size_t*)ptr = 1; |
| 29 | len = _end - _begin; |
| 30 | std::memcpy((void*)(ptr + 8), _begin, _end - _begin); |
| 31 | ((char*)ptr)[_end - _begin + 8] = 0; |
| 32 | } |
| 33 | |
| 34 | SharedString::SharedString() |
| 35 | { |
nothing calls this directly
no outgoing calls
no test coverage detected