Sha256: 5919ea8d7a0138d9a4323a650c2ef9f2cd52da5d6c8922ce307a6ac6fa131a8d

Contents?: true

Size: 860 Bytes

Versions: 15

Compression:

Stored size: 860 Bytes

Contents

/*
 * 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 "oidarray.h"

#include "git2/oidarray.h"
#include "array.h"

void git_oidarray_dispose(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;
}

void git_oidarray__reverse(git_oidarray *arr)
{
	size_t i;
	git_oid tmp;

	for (i = 0; i < arr->count / 2; i++) {
		git_oid_cpy(&tmp, &arr->ids[i]);
		git_oid_cpy(&arr->ids[i], &arr->ids[(arr->count-1)-i]);
		git_oid_cpy(&arr->ids[(arr->count-1)-i], &tmp);
	}
}

#ifndef GIT_DEPRECATE_HARD

void git_oidarray_free(git_oidarray *arr)
{
	git_oidarray_dispose(arr);
}

#endif

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rugged-1.6.5 vendor/libgit2/src/libgit2/oidarray.c
rugged-1.6.3 vendor/libgit2/src/libgit2/oidarray.c
rugged-1.6.2 vendor/libgit2/src/libgit2/oidarray.c
rugged-1.5.1 vendor/libgit2/src/libgit2/oidarray.c
rugged-1.4.5 vendor/libgit2/src/oidarray.c
rugged-1.5.0.1 vendor/libgit2/src/libgit2/oidarray.c
rugged-1.5.0 vendor/libgit2/src/libgit2/oidarray.c
rugged-1.3.2.3 vendor/libgit2/src/oidarray.c
rugged-1.4.4 vendor/libgit2/src/oidarray.c
rugged-1.3.2.1 vendor/libgit2/src/oidarray.c
rugged-1.4.3 vendor/libgit2/src/oidarray.c
rugged-1.3.2 vendor/libgit2/src/oidarray.c
rugged-1.4.2 vendor/libgit2/src/oidarray.c
rugged-1.3.1 vendor/libgit2/src/oidarray.c
rugged-1.3.0 vendor/libgit2/src/oidarray.c