[gnome-keyring/dbus-api] [egg] Add missing definition of egg_buffer_uninit_steal()
- From: Stefan Walter <stefw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-keyring/dbus-api] [egg] Add missing definition of egg_buffer_uninit_steal()
- Date: Fri, 14 Aug 2009 22:50:27 +0000 (UTC)
commit 0844852539aa61a820a175f218761aacf458aefa
Author: Stef Walter <stef memberwebs com>
Date: Fri Aug 14 22:32:07 2009 +0000
[egg] Add missing definition of egg_buffer_uninit_steal()
egg/egg-buffer.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/egg/egg-buffer.c b/egg/egg-buffer.c
index 960d01a..967e960 100644
--- a/egg/egg-buffer.c
+++ b/egg/egg-buffer.c
@@ -113,6 +113,20 @@ egg_buffer_uninit (EggBuffer *buffer)
memset (buffer, 0, sizeof (*buffer));
}
+unsigned char*
+egg_buffer_uninit_steal (EggBuffer *buffer, size_t *n_result)
+{
+ unsigned char *result;
+
+ if (n_result)
+ *n_result = buffer->len;
+ result = buffer->buf;
+
+ memset (buffer, 0, sizeof (*buffer));
+
+ return result;
+}
+
int
egg_buffer_set_allocator (EggBuffer *buffer, EggBufferAllocator allocator)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]