* xmlBufferDetach: * @buf: the buffer * * Remove the string contained in a buffer and gie it back to the * caller. The buffer is reset to an empty content. * This doesn't work with immutable buffers as they can't be reset. * * Returns the previous string contained by the buffer. */
| 7170 | * Returns the previous string contained by the buffer. |
| 7171 | */ |
| 7172 | xmlChar * |
| 7173 | xmlBufferDetach(xmlBufferPtr buf) { |
| 7174 | xmlChar *ret; |
| 7175 | |
| 7176 | if (buf == NULL) |
| 7177 | return(NULL); |
| 7178 | |
| 7179 | ret = buf->content; |
| 7180 | buf->content = NULL; |
| 7181 | buf->size = 0; |
| 7182 | buf->use = 0; |
| 7183 | |
| 7184 | return ret; |
| 7185 | } |
| 7186 | |
| 7187 | |
| 7188 | /** |
no outgoing calls
no test coverage detected