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
05237ee5
Commit
05237ee5
authored
Jun 23, 2019
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integer: use int64_t's for checks
Use int64_t internally for type visibility.
parent
ee0c8618
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/integer.h
+4
-4
No files found.
src/integer.h
View file @
05237ee5
...
...
@@ -8,10 +8,10 @@
#define INCLUDE_integer_h__
/** @return true if p fits into the range of a size_t */
GIT_INLINE
(
int
)
git__is_sizet
(
git_off
_t
p
)
GIT_INLINE
(
int
)
git__is_sizet
(
int64
_t
p
)
{
size_t
r
=
(
size_t
)
p
;
return
p
==
(
git_off
_t
)
r
;
return
p
==
(
int64
_t
)
r
;
}
/** @return true if p fits into the range of an ssize_t */
...
...
@@ -36,10 +36,10 @@ GIT_INLINE(int) git__is_uint32(size_t p)
}
/** @return true if p fits into the range of an unsigned long */
GIT_INLINE
(
int
)
git__is_ulong
(
git_off
_t
p
)
GIT_INLINE
(
int
)
git__is_ulong
(
int64
_t
p
)
{
unsigned
long
r
=
(
unsigned
long
)
p
;
return
p
==
(
git_off
_t
)
r
;
return
p
==
(
int64
_t
)
r
;
}
/** @return true if p fits into the range of an int */
...
...
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