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