[libgit2-glib] Add _ggit_native_release
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Add _ggit_native_release
- Date: Sat, 23 Nov 2013 00:23:50 +0000 (UTC)
commit 3e8b05ddd9cfccd5fdbc36189aa0728cbace7839
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Sat Nov 23 01:23:03 2013 +0100
Add _ggit_native_release
libgit2-glib/ggit-native.c | 17 +++++++++++++++++
libgit2-glib/ggit-native.h | 2 ++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-native.c b/libgit2-glib/ggit-native.c
index defc41e..46d1e4f 100644
--- a/libgit2-glib/ggit-native.c
+++ b/libgit2-glib/ggit-native.c
@@ -125,6 +125,23 @@ _ggit_native_set (gpointer self,
priv->destroy_notify = destroy_notify;
}
+gpointer
+_ggit_native_release (gpointer self)
+{
+ GgitNativePrivate *priv;
+ gpointer ret;
+
+ g_return_val_if_fail (GGIT_IS_NATIVE (self), NULL);
+
+ priv = GGIT_NATIVE (self)->priv;
+
+ ret = priv->native;
+ priv->native = NULL;
+ priv->destroy_notify = NULL;
+
+ return ret;
+}
+
void
_ggit_native_set_destroy_func (gpointer self,
GDestroyNotify destroy_notify)
diff --git a/libgit2-glib/ggit-native.h b/libgit2-glib/ggit-native.h
index 3a02834..321ceb9 100644
--- a/libgit2-glib/ggit-native.h
+++ b/libgit2-glib/ggit-native.h
@@ -64,6 +64,8 @@ void _ggit_native_set (gpointer self,
gpointer native,
GDestroyNotify destroy_notify);
+gpointer _ggit_native_release (gpointer self);
+
void _ggit_native_set_destroy_func (gpointer self,
GDestroyNotify destroy_notify);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]