Blame include/git2/oidarray.h

Packit Service 20376f
/*
Packit Service 20376f
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit Service 20376f
 *
Packit Service 20376f
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit Service 20376f
 * a Linking Exception. For full terms see the included COPYING file.
Packit Service 20376f
 */
Packit Service 20376f
#ifndef INCLUDE_git_oidarray_h__
Packit Service 20376f
#define INCLUDE_git_oidarray_h__
Packit Service 20376f
Packit Service 20376f
#include "common.h"
Packit Service 20376f
#include "oid.h"
Packit Service 20376f
Packit Service 20376f
GIT_BEGIN_DECL
Packit Service 20376f
Packit Service 20376f
/** Array of object ids */
Packit Service 20376f
typedef struct git_oidarray {
Packit Service 20376f
	git_oid *ids;
Packit Service 20376f
	size_t count;
Packit Service 20376f
} git_oidarray;
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * Free the OID array
Packit Service 20376f
 *
Packit Service 20376f
 * This method must (and must only) be called on `git_oidarray`
Packit Service 20376f
 * objects where the array is allocated by the library. Not doing so,
Packit Service 20376f
 * will result in a memory leak.
Packit Service 20376f
 *
Packit Service 20376f
 * This does not free the `git_oidarray` itself, since the library will
Packit Service 20376f
 * never allocate that object directly itself (it is more commonly embedded
Packit Service 20376f
 * inside another struct or created on the stack).
Packit Service 20376f
 *
Packit Service 20376f
 * @param array git_oidarray from which to free oid data
Packit Service 20376f
 */
Packit Service 20376f
GIT_EXTERN(void) git_oidarray_free(git_oidarray *array);
Packit Service 20376f
Packit Service 20376f
/** @} */
Packit Service 20376f
GIT_END_DECL
Packit Service 20376f
Packit Service 20376f
#endif
Packit Service 20376f