summaryrefslogtreecommitdiff
path: root/src/oidarray.c
diff options
context:
space:
mode:
authorVicent Marti <vicent@github.com>2014-08-29 18:19:56 +0200
committerVicent Marti <vicent@github.com>2014-08-29 18:19:56 +0200
commit46a13f32472741f0ed66db7cb75c8cff279886ad (patch)
tree9faad1600432d9f014fedf4775d3f99359937e9d /src/oidarray.c
parentd99c8ca1783cfd04869e88f8707c036fc6053a05 (diff)
parent7db0e6ee48fd68009a7e78cbcbca125d6ce9008d (diff)
downloadlibgit2-46a13f32472741f0ed66db7cb75c8cff279886ad.tar.gz
Merge pull request #2481 from libgit2/cmn/oidarray
merge: expose multiple merge bases
Diffstat (limited to 'src/oidarray.c')
-rw-r--r--src/oidarray.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/oidarray.c b/src/oidarray.c
new file mode 100644
index 000000000..1d51a2958
--- /dev/null
+++ b/src/oidarray.c
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) the libgit2 contributors. All rights reserved.
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+
+#include "git2/oidarray.h"
+#include "oidarray.h"
+#include "array.h"
+
+void git_oidarray_free(git_oidarray *arr)
+{
+ git__free(arr->ids);
+}
+
+void git_oidarray__from_array(git_oidarray *arr, git_array_oid_t *array)
+{
+ arr->count = array->size;
+ arr->ids = array->ptr;
+}