[libgit2-glib] Standarize wrap vs new. Use wrap everywhere.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] Standarize wrap vs new. Use wrap everywhere.
- Date: Sun, 4 Nov 2012 15:48:47 +0000 (UTC)
commit 30b9d816c4c0aced2db520b3799122ba6046b47a
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun Nov 4 16:48:24 2012 +0100
Standarize wrap vs new. Use wrap everywhere.
libgit2-glib/ggit-commit.c | 8 ++++----
libgit2-glib/ggit-diff-file.c | 2 +-
libgit2-glib/ggit-index-entry-resolve-undo.c | 10 +++++-----
libgit2-glib/ggit-index-entry-resolve-undo.h | 2 +-
libgit2-glib/ggit-index-entry.c | 10 +++++-----
libgit2-glib/ggit-index-entry.h | 12 ++++++------
libgit2-glib/ggit-index.c | 4 ++--
libgit2-glib/ggit-object.c | 2 +-
libgit2-glib/ggit-oid.c | 8 ++++----
libgit2-glib/ggit-oid.h | 2 +-
libgit2-glib/ggit-ref.c | 4 ++--
libgit2-glib/ggit-reflog-entry.c | 6 +++---
libgit2-glib/ggit-reflog-entry.h | 2 +-
libgit2-glib/ggit-reflog.c | 4 ++--
libgit2-glib/ggit-reflog.h | 2 +-
libgit2-glib/ggit-remote.c | 4 ++--
libgit2-glib/ggit-repository.c | 14 +++++++-------
libgit2-glib/ggit-revision-walker.c | 2 +-
libgit2-glib/ggit-submodule.c | 8 ++++----
libgit2-glib/ggit-submodule.h | 2 +-
libgit2-glib/ggit-tag.c | 2 +-
libgit2-glib/ggit-tree-entry.c | 4 ++--
libgit2-glib/ggit-tree-entry.h | 2 +-
libgit2-glib/ggit-tree.c | 8 ++++----
24 files changed, 62 insertions(+), 62 deletions(-)
---
diff --git a/libgit2-glib/ggit-commit.c b/libgit2-glib/ggit-commit.c
index 1237a29..5666281 100644
--- a/libgit2-glib/ggit-commit.c
+++ b/libgit2-glib/ggit-commit.c
@@ -49,7 +49,7 @@ G_DEFINE_BOXED_TYPE (GgitCommitParents,
ggit_commit_parents_unref)
static GgitCommitParents *
-ggit_commit_parents_new (GgitCommit *commit)
+ggit_commit_parents_wrap (GgitCommit *commit)
{
GgitCommitParents *ret;
@@ -319,7 +319,7 @@ ggit_commit_get_parents (GgitCommit *commit)
{
g_return_val_if_fail (GGIT_IS_COMMIT (commit), NULL);
- return ggit_commit_parents_new (commit);
+ return ggit_commit_parents_wrap (commit);
}
/**
@@ -393,7 +393,7 @@ ggit_commit_parents_get_id (GgitCommitParents *parents,
c = _ggit_native_get (parents->commit);
oid = git_commit_parent_oid (c, idx);
- return _ggit_oid_new (oid);
+ return _ggit_oid_wrap (oid);
}
/**
@@ -448,7 +448,7 @@ ggit_commit_get_tree_id (GgitCommit *commit)
oid = git_commit_tree_oid (c);
- return _ggit_oid_new (oid);
+ return _ggit_oid_wrap (oid);
}
/**
diff --git a/libgit2-glib/ggit-diff-file.c b/libgit2-glib/ggit-diff-file.c
index 7cfacde..8723405 100644
--- a/libgit2-glib/ggit-diff-file.c
+++ b/libgit2-glib/ggit-diff-file.c
@@ -46,7 +46,7 @@ _ggit_diff_file_wrap (const git_diff_file *file)
gfile = g_slice_new (GgitDiffFile);
gfile->ref_count = 1;
- gfile->oid = _ggit_oid_new (&file->oid);
+ gfile->oid = _ggit_oid_wrap (&file->oid);
gfile->path = file->path == NULL ? NULL : g_strdup (file->path);
gfile->mode = file->mode;
gfile->size = file->size;
diff --git a/libgit2-glib/ggit-index-entry-resolve-undo.c b/libgit2-glib/ggit-index-entry-resolve-undo.c
index f9cf660..70a383d 100644
--- a/libgit2-glib/ggit-index-entry-resolve-undo.c
+++ b/libgit2-glib/ggit-index-entry-resolve-undo.c
@@ -44,7 +44,7 @@ G_DEFINE_BOXED_TYPE (GgitIndexEntryResolveUndo,
ggit_index_entry_resolve_undo_unref)
static GgitIndexEntryResolveUndo *
-ggit_index_entry_resolve_undo_new (git_index_reuc_entry *entry)
+ggit_index_entry_resolve_undo_wrap (git_index_reuc_entry *entry)
{
GgitIndexEntryResolveUndo *ret;
@@ -56,7 +56,7 @@ ggit_index_entry_resolve_undo_new (git_index_reuc_entry *entry)
}
GgitIndexEntriesResolveUndo *
-_ggit_index_entries_resolve_undo_new (GgitIndex *owner)
+_ggit_index_entries_resolve_undo_wrap (GgitIndex *owner)
{
GgitIndexEntriesResolveUndo *ret;
@@ -170,7 +170,7 @@ ggit_index_entries_resolve_undo_get (GgitIndexEntriesResolveUndo *entries,
gidx = _ggit_index_get_index (entries->owner);
ret = git_index_reuc_get_byindex (gidx, idx);
- return ggit_index_entry_resolve_undo_new ((git_index_reuc_entry *)ret);
+ return ggit_index_entry_resolve_undo_wrap ((git_index_reuc_entry *)ret);
}
/**
@@ -227,7 +227,7 @@ ggit_index_entries_resolve_undo_get_by_file (GgitIndexEntriesResolveUndo *entri
if (ret)
{
- return ggit_index_entry_resolve_undo_new ((git_index_reuc_entry *)ret);
+ return ggit_index_entry_resolve_undo_wrap ((git_index_reuc_entry *)ret);
}
else
{
@@ -273,7 +273,7 @@ ggit_index_entry_resolve_undo_get_id (GgitIndexEntryResolveUndo *entry,
g_return_val_if_fail (entry != NULL, NULL);
g_return_val_if_fail (stage >= 0 && stage <= 3, NULL);
- return _ggit_oid_new (&entry->entry->oid[stage]);
+ return _ggit_oid_wrap (&entry->entry->oid[stage]);
}
/**
diff --git a/libgit2-glib/ggit-index-entry-resolve-undo.h b/libgit2-glib/ggit-index-entry-resolve-undo.h
index 8db3047..69b1717 100644
--- a/libgit2-glib/ggit-index-entry-resolve-undo.h
+++ b/libgit2-glib/ggit-index-entry-resolve-undo.h
@@ -35,7 +35,7 @@ G_BEGIN_DECLS
#define GGIT_INDEX_ENTRIES_RESOLVE_UNDO(obj) ((GgitIndexEntriesResolveUndo *)obj)
GgitIndexEntriesResolveUndo *
- _ggit_index_entries_resolve_undo_new (GgitIndex *owner);
+ _ggit_index_entries_resolve_undo_wrap (GgitIndex *owner);
GgitIndexEntryResolveUndo *
ggit_index_entries_resolve_undo_get (GgitIndexEntriesResolveUndo *entries,
diff --git a/libgit2-glib/ggit-index-entry.c b/libgit2-glib/ggit-index-entry.c
index ce2383e..e74f464 100644
--- a/libgit2-glib/ggit-index-entry.c
+++ b/libgit2-glib/ggit-index-entry.c
@@ -44,7 +44,7 @@ G_DEFINE_BOXED_TYPE (GgitIndexEntry,
ggit_index_entry_unref)
static GgitIndexEntry *
-ggit_index_entry_new (git_index_entry *entry)
+ggit_index_entry_wrap (git_index_entry *entry)
{
GgitIndexEntry *ret;
@@ -57,7 +57,7 @@ ggit_index_entry_new (git_index_entry *entry)
}
GgitIndexEntries *
-_ggit_index_entries_new (GgitIndex *owner)
+_ggit_index_entries_wrap (GgitIndex *owner)
{
GgitIndexEntries *ret;
@@ -175,7 +175,7 @@ ggit_index_entries_get_by_index (GgitIndexEntries *entries,
if (entry)
{
- return ggit_index_entry_new (entry);
+ return ggit_index_entry_wrap (entry);
}
else
{
@@ -222,7 +222,7 @@ ggit_index_entries_get_by_path (GgitIndexEntries *entries,
if (entry)
{
- return ggit_index_entry_new (entry);
+ return ggit_index_entry_wrap (entry);
}
else
{
@@ -367,7 +367,7 @@ ggit_index_entry_get_id (GgitIndexEntry *entry)
{
g_return_val_if_fail (entry != NULL, NULL);
- return _ggit_oid_new (&entry->entry->oid);
+ return _ggit_oid_wrap (&entry->entry->oid);
}
/**
diff --git a/libgit2-glib/ggit-index-entry.h b/libgit2-glib/ggit-index-entry.h
index 16ff95e..cc2d847 100644
--- a/libgit2-glib/ggit-index-entry.h
+++ b/libgit2-glib/ggit-index-entry.h
@@ -36,16 +36,16 @@ G_BEGIN_DECLS
#define GGIT_INDEX_ENTRIES(obj) ((GgitIndexEntries *)obj)
GType ggit_index_entries_get_type (void) G_GNUC_CONST;
-GgitIndexEntries *_ggit_index_entries_new (GgitIndex *owner);
+GgitIndexEntries *_ggit_index_entries_wrap (GgitIndex *owner);
GgitIndexEntries *ggit_index_entries_ref (GgitIndexEntries *entries);
void ggit_index_entries_unref (GgitIndexEntries *entries);
-GgitIndexEntry *ggit_index_entries_get_by_index (GgitIndexEntries *entries,
- gsize idx);
+GgitIndexEntry *ggit_index_entries_get_by_index (GgitIndexEntries *entries,
+ gsize idx);
-GgitIndexEntry *ggit_index_entries_get_by_path (GgitIndexEntries *entries,
- GFile *file,
- gboolean stage);
+GgitIndexEntry *ggit_index_entries_get_by_path (GgitIndexEntries *entries,
+ GFile *file,
+ gboolean stage);
guint ggit_index_entries_size (GgitIndexEntries *entries);
diff --git a/libgit2-glib/ggit-index.c b/libgit2-glib/ggit-index.c
index 4120eea..645010e 100644
--- a/libgit2-glib/ggit-index.c
+++ b/libgit2-glib/ggit-index.c
@@ -389,7 +389,7 @@ ggit_index_get_entries (GgitIndex *idx)
{
g_return_val_if_fail (GGIT_IS_INDEX (idx), NULL);
- return _ggit_index_entries_new (idx);
+ return _ggit_index_entries_wrap (idx);
}
/**
@@ -406,7 +406,7 @@ ggit_index_get_entries_resolve_undo (GgitIndex *idx)
{
g_return_val_if_fail (GGIT_IS_INDEX (idx), NULL);
- return _ggit_index_entries_resolve_undo_new (idx);
+ return _ggit_index_entries_resolve_undo_wrap (idx);
}
/* ex:set ts=8 noet: */
diff --git a/libgit2-glib/ggit-object.c b/libgit2-glib/ggit-object.c
index 0de5df0..e85fd50 100644
--- a/libgit2-glib/ggit-object.c
+++ b/libgit2-glib/ggit-object.c
@@ -52,7 +52,7 @@ ggit_object_get_id (GgitObject *object)
oid = git_object_id (_ggit_native_get (object));
- return _ggit_oid_new ((git_oid *)oid);
+ return _ggit_oid_wrap ((git_oid *)oid);
}
/**
diff --git a/libgit2-glib/ggit-oid.c b/libgit2-glib/ggit-oid.c
index f87659a..ab33fcb 100644
--- a/libgit2-glib/ggit-oid.c
+++ b/libgit2-glib/ggit-oid.c
@@ -30,7 +30,7 @@ struct _GgitOId
G_DEFINE_BOXED_TYPE (GgitOId, ggit_oid, ggit_oid_copy, ggit_oid_free)
GgitOId *
-_ggit_oid_new (const git_oid *oid)
+_ggit_oid_wrap (const git_oid *oid)
{
GgitOId *glib_oid;
@@ -59,7 +59,7 @@ ggit_oid_copy (GgitOId *oid)
{
g_return_val_if_fail (oid != NULL, NULL);
- return _ggit_oid_new (&oid->oid);
+ return _ggit_oid_wrap (&oid->oid);
}
/**
@@ -96,7 +96,7 @@ ggit_oid_new_from_string (const gchar *str)
if (git_oid_fromstr (&oid, str) == GIT_OK)
{
- glib_oid = _ggit_oid_new (&oid);
+ glib_oid = _ggit_oid_wrap (&oid);
}
return glib_oid;
@@ -119,7 +119,7 @@ ggit_oid_new_from_raw (const guchar *raw)
git_oid_fromraw (&oid, raw);
- return _ggit_oid_new (&oid);
+ return _ggit_oid_wrap (&oid);
}
/**
diff --git a/libgit2-glib/ggit-oid.h b/libgit2-glib/ggit-oid.h
index da6a544..6d6ff64 100644
--- a/libgit2-glib/ggit-oid.h
+++ b/libgit2-glib/ggit-oid.h
@@ -34,7 +34,7 @@ G_BEGIN_DECLS
GType ggit_oid_get_type (void) G_GNUC_CONST;
-GgitOId *_ggit_oid_new (const git_oid *oid);
+GgitOId *_ggit_oid_wrap (const git_oid *oid);
const git_oid *_ggit_oid_get_oid (GgitOId *oid);
diff --git a/libgit2-glib/ggit-ref.c b/libgit2-glib/ggit-ref.c
index b8a44f7..8d717aa 100644
--- a/libgit2-glib/ggit-ref.c
+++ b/libgit2-glib/ggit-ref.c
@@ -70,7 +70,7 @@ ggit_ref_get_id (GgitRef *ref)
if (oid != NULL)
{
- goid = _ggit_oid_new ((git_oid *)oid);
+ goid = _ggit_oid_wrap ((git_oid *)oid);
}
return goid;
@@ -397,7 +397,7 @@ ggit_ref_get_reflog (GgitRef *ref,
return NULL;
}
- return _ggit_reflog_new (reflog);
+ return _ggit_reflog_wrap (reflog);
}
/**
diff --git a/libgit2-glib/ggit-reflog-entry.c b/libgit2-glib/ggit-reflog-entry.c
index 74ccad7..362f60e 100644
--- a/libgit2-glib/ggit-reflog-entry.c
+++ b/libgit2-glib/ggit-reflog-entry.c
@@ -33,7 +33,7 @@ G_DEFINE_BOXED_TYPE (GgitReflogEntry, ggit_reflog_entry,
ggit_reflog_entry_ref, ggit_reflog_entry_unref)
GgitReflogEntry *
-_ggit_reflog_entry_new (const git_reflog_entry *reflog_entry)
+_ggit_reflog_entry_wrap (const git_reflog_entry *reflog_entry)
{
GgitReflogEntry *greflog_entry;
@@ -98,7 +98,7 @@ ggit_reflog_entry_get_old_oid (GgitReflogEntry *reflog_entry)
oid = git_reflog_entry_oidold (reflog_entry->reflog_entry);
- return _ggit_oid_new (oid);
+ return _ggit_oid_wrap (oid);
}
/**
@@ -118,7 +118,7 @@ ggit_reflog_entry_get_new_oid (GgitReflogEntry *reflog_entry)
oid = git_reflog_entry_oidnew (reflog_entry->reflog_entry);
- return _ggit_oid_new (oid);
+ return _ggit_oid_wrap (oid);
}
/**
diff --git a/libgit2-glib/ggit-reflog-entry.h b/libgit2-glib/ggit-reflog-entry.h
index 067115c..856baa2 100644
--- a/libgit2-glib/ggit-reflog-entry.h
+++ b/libgit2-glib/ggit-reflog-entry.h
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
GType ggit_reflog_entry_get_type (void) G_GNUC_CONST;
-GgitReflogEntry *_ggit_reflog_entry_new (const git_reflog_entry *reflog_entry);
+GgitReflogEntry *_ggit_reflog_entry_wrap (const git_reflog_entry *reflog_entry);
GgitReflogEntry *ggit_reflog_entry_ref (GgitReflogEntry *reflog_entry);
void ggit_reflog_entry_unref (GgitReflogEntry *reflog_entry);
diff --git a/libgit2-glib/ggit-reflog.c b/libgit2-glib/ggit-reflog.c
index fe0f23e..4f893f2 100644
--- a/libgit2-glib/ggit-reflog.c
+++ b/libgit2-glib/ggit-reflog.c
@@ -31,7 +31,7 @@ struct _GgitReflog
G_DEFINE_BOXED_TYPE (GgitReflog, ggit_reflog, ggit_reflog_ref, ggit_reflog_unref)
GgitReflog *
-_ggit_reflog_new (git_reflog *reflog)
+_ggit_reflog_wrap (git_reflog *reflog)
{
GgitReflog *greflog;
@@ -120,7 +120,7 @@ ggit_reflog_get_entry_from_index (GgitReflog *reflog,
return NULL;
}
- return _ggit_reflog_entry_new (reflog_entry);
+ return _ggit_reflog_entry_wrap (reflog_entry);
}
/* ex:set ts=8 noet: */
diff --git a/libgit2-glib/ggit-reflog.h b/libgit2-glib/ggit-reflog.h
index 8c88c01..1ec9eac 100644
--- a/libgit2-glib/ggit-reflog.h
+++ b/libgit2-glib/ggit-reflog.h
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
GType ggit_reflog_get_type (void) G_GNUC_CONST;
-GgitReflog *_ggit_reflog_new (git_reflog *reflog);
+GgitReflog *_ggit_reflog_wrap (git_reflog *reflog);
GgitReflog *ggit_reflog_ref (GgitReflog *reflog);
void ggit_reflog_unref (GgitReflog *reflog);
diff --git a/libgit2-glib/ggit-remote.c b/libgit2-glib/ggit-remote.c
index e8b4e45..453da7f 100644
--- a/libgit2-glib/ggit-remote.c
+++ b/libgit2-glib/ggit-remote.c
@@ -359,8 +359,8 @@ remote_list_callback_wrapper (git_remote_head *head,
GgitOId *loid;
gint ret;
- oid = _ggit_oid_new (&head->oid);
- loid = _ggit_oid_new (&head->loid);
+ oid = _ggit_oid_wrap (&head->oid);
+ loid = _ggit_oid_wrap (&head->loid);
ret = data->callback (head->name, oid, loid,
head->local, data->user_data);
diff --git a/libgit2-glib/ggit-repository.c b/libgit2-glib/ggit-repository.c
index 10f6ef6..916f3d6 100644
--- a/libgit2-glib/ggit-repository.c
+++ b/libgit2-glib/ggit-repository.c
@@ -1136,7 +1136,7 @@ ggit_repository_create_tag (GgitRepository *repository,
return NULL;
}
- return _ggit_oid_new (&oid);
+ return _ggit_oid_wrap (&oid);
}
/**
@@ -1180,7 +1180,7 @@ ggit_repository_create_tag_from_buffer (GgitRepository *repository,
return NULL;
}
- return _ggit_oid_new (&oid);
+ return _ggit_oid_wrap (&oid);
}
/**
@@ -1227,7 +1227,7 @@ ggit_repository_create_tag_lightweight (GgitRepository *repository,
return NULL;
}
- return _ggit_oid_new (&oid);
+ return _ggit_oid_wrap (&oid);
}
/**
@@ -1527,7 +1527,7 @@ ggit_repository_lookup_submodule (GgitRepository *repository,
if (ret == GIT_OK)
{
- gsubmodule = _ggit_submodule_new (submodule);
+ gsubmodule = _ggit_submodule_wrap (submodule);
}
else
{
@@ -1553,7 +1553,7 @@ submodule_wrapper_callback (git_submodule *submodule,
GgitSubmodule *gsubmodule;
gint ret;
- gsubmodule = _ggit_submodule_new (submodule);
+ gsubmodule = _ggit_submodule_wrap (submodule);
ret = wrapper_data->callback (gsubmodule, name, wrapper_data->user_data);
@@ -1678,7 +1678,7 @@ ggit_repository_save_stash (GgitRepository *repository,
return NULL;
}
- return _ggit_oid_new (&oid);
+ return _ggit_oid_wrap (&oid);
}
/**
@@ -1726,7 +1726,7 @@ stash_callback_wrapper (gsize index,
GgitOId *oid;
gint ret;
- oid = _ggit_oid_new (stash_oid);
+ oid = _ggit_oid_wrap (stash_oid);
ret = wrapper_data->callback (index, message, oid, wrapper_data->user_data);
ggit_oid_free (oid);
diff --git a/libgit2-glib/ggit-revision-walker.c b/libgit2-glib/ggit-revision-walker.c
index 118ed08..8f907a4 100644
--- a/libgit2-glib/ggit-revision-walker.c
+++ b/libgit2-glib/ggit-revision-walker.c
@@ -310,7 +310,7 @@ ggit_revision_walker_next (GgitRevisionWalker *walker,
if (ret == GIT_OK)
{
- goid = _ggit_oid_new (&oid);
+ goid = _ggit_oid_wrap (&oid);
}
else if (ret != GIT_ITEROVER)
{
diff --git a/libgit2-glib/ggit-submodule.c b/libgit2-glib/ggit-submodule.c
index 979a5ff..f0dbe1d 100644
--- a/libgit2-glib/ggit-submodule.c
+++ b/libgit2-glib/ggit-submodule.c
@@ -35,7 +35,7 @@ struct _GgitSubmodule
G_DEFINE_BOXED_TYPE (GgitSubmodule, ggit_submodule, ggit_submodule_ref, ggit_submodule_unref)
GgitSubmodule *
-_ggit_submodule_new (const git_submodule *submodule)
+_ggit_submodule_wrap (const git_submodule *submodule)
{
GgitSubmodule *glib_submodule;
@@ -231,7 +231,7 @@ ggit_submodule_get_index_oid (GgitSubmodule *submodule)
if (git_submodule_index_oid (submodule->submodule))
{
- oid = _ggit_oid_new (git_submodule_index_oid (submodule->submodule));
+ oid = _ggit_oid_wrap (git_submodule_index_oid (submodule->submodule));
}
return oid;
@@ -254,7 +254,7 @@ ggit_submodule_get_head_oid (GgitSubmodule *submodule)
if (git_submodule_head_oid (submodule->submodule))
{
- oid = _ggit_oid_new (git_submodule_head_oid (submodule->submodule));
+ oid = _ggit_oid_wrap (git_submodule_head_oid (submodule->submodule));
}
return oid;
@@ -281,7 +281,7 @@ ggit_submodule_get_workdir_oid (GgitSubmodule *submodule)
if (git_submodule_wd_oid (submodule->submodule))
{
- oid = _ggit_oid_new (git_submodule_wd_oid (submodule->submodule));
+ oid = _ggit_oid_wrap (git_submodule_wd_oid (submodule->submodule));
}
return oid;
diff --git a/libgit2-glib/ggit-submodule.h b/libgit2-glib/ggit-submodule.h
index a1d2bc8..979f7e7 100644
--- a/libgit2-glib/ggit-submodule.h
+++ b/libgit2-glib/ggit-submodule.h
@@ -33,7 +33,7 @@ G_BEGIN_DECLS
GType ggit_submodule_get_type (void) G_GNUC_CONST;
-GgitSubmodule *_ggit_submodule_new (const git_submodule *submodule);
+GgitSubmodule *_ggit_submodule_wrap (const git_submodule *submodule);
GgitSubmodule *ggit_submodule_ref (GgitSubmodule *submodule);
void ggit_submodule_unref (GgitSubmodule *submodule);
diff --git a/libgit2-glib/ggit-tag.c b/libgit2-glib/ggit-tag.c
index e8ed571..3206baf 100644
--- a/libgit2-glib/ggit-tag.c
+++ b/libgit2-glib/ggit-tag.c
@@ -115,7 +115,7 @@ ggit_tag_get_target_id (GgitTag *tag)
t = _ggit_native_get (tag);
oid = git_tag_target_oid (t);
- return _ggit_oid_new ((git_oid *)oid);
+ return _ggit_oid_wrap ((git_oid *)oid);
}
/**
diff --git a/libgit2-glib/ggit-tree-entry.c b/libgit2-glib/ggit-tree-entry.c
index b53c687..fdecaa1 100644
--- a/libgit2-glib/ggit-tree-entry.c
+++ b/libgit2-glib/ggit-tree-entry.c
@@ -34,7 +34,7 @@ G_DEFINE_BOXED_TYPE (GgitTreeEntry,
ggit_tree_entry_unref)
GgitTreeEntry *
-_ggit_tree_entry_new (const git_tree_entry *entry)
+_ggit_tree_entry_wrap (const git_tree_entry *entry)
{
GgitTreeEntry *ret;
@@ -112,7 +112,7 @@ ggit_tree_entry_get_id (GgitTreeEntry *entry)
{
g_return_val_if_fail (entry != NULL, NULL);
- return _ggit_oid_new (git_tree_entry_id (entry->entry));
+ return _ggit_oid_wrap (git_tree_entry_id (entry->entry));
}
/**
diff --git a/libgit2-glib/ggit-tree-entry.h b/libgit2-glib/ggit-tree-entry.h
index e469225..5552fa1 100644
--- a/libgit2-glib/ggit-tree-entry.h
+++ b/libgit2-glib/ggit-tree-entry.h
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
GType ggit_tree_entry_get_type (void) G_GNUC_CONST;
-GgitTreeEntry *_ggit_tree_entry_new (const git_tree_entry *entry);
+GgitTreeEntry *_ggit_tree_entry_wrap (const git_tree_entry *entry);
GgitTreeEntry *ggit_tree_entry_ref (GgitTreeEntry *entry);
void ggit_tree_entry_unref (GgitTreeEntry *entry);
diff --git a/libgit2-glib/ggit-tree.c b/libgit2-glib/ggit-tree.c
index 6b11a99..54d150e 100644
--- a/libgit2-glib/ggit-tree.c
+++ b/libgit2-glib/ggit-tree.c
@@ -76,7 +76,7 @@ ggit_tree_get_id (GgitTree *tree)
oid = git_tree_id (t);
- return _ggit_oid_new (oid);
+ return _ggit_oid_wrap (oid);
}
/**
@@ -102,7 +102,7 @@ ggit_tree_get (GgitTree *tree,
entry = git_tree_entry_byindex (t, i);
- return _ggit_tree_entry_new (entry);
+ return _ggit_tree_entry_wrap (entry);
}
/**
@@ -149,7 +149,7 @@ ggit_tree_get_by_file (GgitTree *tree,
t = _ggit_native_get (tree);
path = g_file_get_path (file);
- entry = _ggit_tree_entry_new (git_tree_entry_byname (t, path));
+ entry = _ggit_tree_entry_wrap (git_tree_entry_byname (t, path));
g_free (path);
return entry;
@@ -170,7 +170,7 @@ walk_callback_wrapper (const char *root,
GgitTreeEntry *wentry;
WalkInfo *info = (WalkInfo *)payload;
- wentry = _ggit_tree_entry_new (entry);
+ wentry = _ggit_tree_entry_wrap (entry);
ret = info->callback(root, wentry, info->user_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]