Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
17cdf252
Commit
17cdf252
authored
Feb 27, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make some Object methods take a const parameter
Signed-off-by: Vicent Marti <tanoku@gmail.com>
parent
2e60b652
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
src/git2/object.h
+3
-3
src/object.c
+3
-3
No files found.
src/git2/object.h
View file @
17cdf252
...
@@ -66,7 +66,7 @@ GIT_EXTERN(int) git_object_write(git_object *object);
...
@@ -66,7 +66,7 @@ GIT_EXTERN(int) git_object_write(git_object *object);
* @param obj the repository object
* @param obj the repository object
* @return the SHA1 id
* @return the SHA1 id
*/
*/
GIT_EXTERN
(
const
git_oid
*
)
git_object_id
(
git_object
*
obj
);
GIT_EXTERN
(
const
git_oid
*
)
git_object_id
(
const
git_object
*
obj
);
/**
/**
* Get the object type of an object
* Get the object type of an object
...
@@ -74,7 +74,7 @@ GIT_EXTERN(const git_oid *) git_object_id(git_object *obj);
...
@@ -74,7 +74,7 @@ GIT_EXTERN(const git_oid *) git_object_id(git_object *obj);
* @param obj the repository object
* @param obj the repository object
* @return the object's type
* @return the object's type
*/
*/
GIT_EXTERN
(
git_otype
)
git_object_type
(
git_object
*
obj
);
GIT_EXTERN
(
git_otype
)
git_object_type
(
const
git_object
*
obj
);
/**
/**
* Get the repository that owns this object
* Get the repository that owns this object
...
@@ -82,7 +82,7 @@ GIT_EXTERN(git_otype) git_object_type(git_object *obj);
...
@@ -82,7 +82,7 @@ GIT_EXTERN(git_otype) git_object_type(git_object *obj);
* @param obj the object
* @param obj the object
* @return the repository who owns this object
* @return the repository who owns this object
*/
*/
GIT_EXTERN
(
git_repository
*
)
git_object_owner
(
git_object
*
obj
);
GIT_EXTERN
(
git_repository
*
)
git_object_owner
(
const
git_object
*
obj
);
/**
/**
* Free a reference to one of the objects in the repository.
* Free a reference to one of the objects in the repository.
...
...
src/object.c
View file @
17cdf252
...
@@ -283,7 +283,7 @@ void git_object_free(git_object *object)
...
@@ -283,7 +283,7 @@ void git_object_free(git_object *object)
}
}
}
}
const
git_oid
*
git_object_id
(
git_object
*
obj
)
const
git_oid
*
git_object_id
(
const
git_object
*
obj
)
{
{
assert
(
obj
);
assert
(
obj
);
...
@@ -293,13 +293,13 @@ const git_oid *git_object_id(git_object *obj)
...
@@ -293,13 +293,13 @@ const git_oid *git_object_id(git_object *obj)
return
&
obj
->
id
;
return
&
obj
->
id
;
}
}
git_otype
git_object_type
(
git_object
*
obj
)
git_otype
git_object_type
(
const
git_object
*
obj
)
{
{
assert
(
obj
);
assert
(
obj
);
return
obj
->
source
.
raw
.
type
;
return
obj
->
source
.
raw
.
type
;
}
}
git_repository
*
git_object_owner
(
git_object
*
obj
)
git_repository
*
git_object_owner
(
const
git_object
*
obj
)
{
{
assert
(
obj
);
assert
(
obj
);
return
obj
->
repo
;
return
obj
->
repo
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment