Commit 17572f67 by Edward Thomson

git_patch_parse_ctx: refcount the context

parent 9be638ec
...@@ -61,21 +61,6 @@ typedef struct { ...@@ -61,21 +61,6 @@ typedef struct {
#define GIT_PATCH_OPTIONS_INIT { 1 } #define GIT_PATCH_OPTIONS_INIT { 1 }
/**
* Create a patch for a single file from the contents of a patch buffer.
*
* @param out The patch to be created
* @param contents The contents of a patch file
* @param contents_len The length of the patch file
* @param opts The git_patch_options
* @return 0 on success, <0 on failure.
*/
extern int git_patch_from_buffer(
git_patch **out,
const char *contents,
size_t contents_len,
git_patch_options *opts);
extern void git_patch_free(git_patch *patch); extern void git_patch_free(git_patch *patch);
#endif #endif
/*
* 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.
*/
#ifndef INCLUDE_patch_parse_h__
#define INCLUDE_patch_parse_h__
/**
* Create a patch for a single file from the contents of a patch buffer.
*
* @param out The patch to be created
* @param contents The contents of a patch file
* @param contents_len The length of the patch file
* @param opts The git_patch_options
* @return 0 on success, <0 on failure.
*/
extern int git_patch_from_buffer(
git_patch **out,
const char *contents,
size_t contents_len,
const git_patch_options *opts);
#endif
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "apply.h" #include "apply.h"
#include "patch.h" #include "patch.h"
#include "patch_parse.h"
#include "repository.h" #include "repository.h"
#include "buf_text.h" #include "buf_text.h"
......
#include "clar_libgit2.h" #include "clar_libgit2.h"
#include "patch.h" #include "patch.h"
#include "patch_parse.h"
#include "patch_common.h" #include "patch_common.h"
......
#include "clar_libgit2.h" #include "clar_libgit2.h"
#include "patch.h" #include "patch.h"
#include "patch_parse.h"
#include "patch_common.h" #include "patch_common.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment