Commit fad04120 by Vicent Marti

Merge pull request #2224 from ethomson/merge_file_const

Const up members of git_merge_file_result
parents 336e8957 7f930ded
...@@ -177,13 +177,13 @@ typedef struct { ...@@ -177,13 +177,13 @@ typedef struct {
* The path that the resultant merge file should use, or NULL if a * The path that the resultant merge file should use, or NULL if a
* filename conflict would occur. * filename conflict would occur.
*/ */
char *path; const char *path;
/** The mode that the resultant merge file should use. */ /** The mode that the resultant merge file should use. */
unsigned int mode; unsigned int mode;
/** The contents of the merge. */ /** The contents of the merge. */
unsigned char *ptr; const char *ptr;
/** The length of the merge contents. */ /** The length of the merge contents. */
size_t len; size_t len;
......
...@@ -272,8 +272,8 @@ void git_merge_file_result_free(git_merge_file_result *result) ...@@ -272,8 +272,8 @@ void git_merge_file_result_free(git_merge_file_result *result)
if (result == NULL) if (result == NULL)
return; return;
git__free(result->path); git__free((char *)result->path);
/* xdiff uses malloc() not git_malloc, so we use free(), not git_free() */ /* xdiff uses malloc() not git_malloc, so we use free(), not git_free() */
free(result->ptr); free((char *)result->ptr);
} }
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