This is to be used only in the case when one cannot use c_ptr(). The cases are: - When one initializes String with an external buffer and length and buffer[length] could be uninitialized when c_ptr() is called. - When valgrind gives warnings about uninitialized memory with c_ptr(). */
| 708 | - When valgrind gives warnings about uninitialized memory with c_ptr(). |
| 709 | */ |
| 710 | inline char *c_ptr_safe() |
| 711 | { |
| 712 | if (Ptr && str_length < Alloced_length) |
| 713 | Ptr[str_length]=0; |
| 714 | else |
| 715 | (void) realloc(str_length); |
| 716 | return Ptr; |
| 717 | } |
| 718 | |
| 719 | inline void free() |
| 720 | { |
no outgoing calls