[libgit2-glib/wip/development: 9/12] Fix ggit_patch_to_string
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib/wip/development: 9/12] Fix ggit_patch_to_string
- Date: Sat, 26 Apr 2014 14:15:32 +0000 (UTC)
commit 47a91ecb0a90bb2817a096769630bcec4b6fce30
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Apr 26 15:57:43 2014 +0200
Fix ggit_patch_to_string
libgit2-glib/ggit-patch.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/libgit2-glib/ggit-patch.c b/libgit2-glib/ggit-patch.c
index be83e20..e983a0f 100644
--- a/libgit2-glib/ggit-patch.c
+++ b/libgit2-glib/ggit-patch.c
@@ -180,19 +180,19 @@ gchar *
ggit_patch_to_string (GgitPatch *patch,
GError **error)
{
- char *retval;
+ git_buf buf;
gchar *result = NULL;
gint ret;
g_return_val_if_fail (patch != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
- ret = git_patch_to_str (&retval, patch->patch);
+ ret = git_patch_to_buf (&buf, patch->patch);
if (ret == GIT_OK)
{
- result = g_strdup (retval);
- free (retval);
+ result = g_strdup (buf.ptr);
+ git_buf_free (&buf);
}
return result;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]