diff options
Diffstat (limited to 'src/include/gnunet_buffer_lib.h')
-rw-r--r-- | src/include/gnunet_buffer_lib.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/gnunet_buffer_lib.h b/src/include/gnunet_buffer_lib.h index c0ae06d77..e23536ab2 100644 --- a/src/include/gnunet_buffer_lib.h +++ b/src/include/gnunet_buffer_lib.h | |||
@@ -165,6 +165,19 @@ GNUNET_buffer_reap_str (struct GNUNET_Buffer *buf); | |||
165 | 165 | ||
166 | 166 | ||
167 | /** | 167 | /** |
168 | * Clear the buffer and return its contents. | ||
169 | * The caller is responsible to eventually #GNUNET_free | ||
170 | * the returned data. | ||
171 | * | ||
172 | * @param buf the buffer to reap the contents from | ||
173 | * @param size where to store the size of the returned data | ||
174 | * @returns the data contained in the string | ||
175 | */ | ||
176 | void * | ||
177 | GNUNET_buffer_reap (struct GNUNET_Buffer *buf, size_t *size); | ||
178 | |||
179 | |||
180 | /** | ||
168 | * Free the backing memory of the given buffer. | 181 | * Free the backing memory of the given buffer. |
169 | * Does not free the memory of the buffer control structure, | 182 | * Does not free the memory of the buffer control structure, |
170 | * which is typically stack-allocated. | 183 | * which is typically stack-allocated. |