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
3ecc8b5e
Commit
3ecc8b5e
authored
Feb 18, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix refcounting initialization
Signed-off-by: Vicent Marti <tanoku@gmail.com>
parent
084c1935
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/thread-utils.h
+4
-4
No files found.
src/thread-utils.h
View file @
3ecc8b5e
...
...
@@ -34,9 +34,9 @@
# define gitrc_free(a) (void)0
# elif defined(GIT_WIN32)
typedef
long
git_refcnt
;
# define gitrc_init(a, v)
*a = v
# define gitrc_inc(a)
InterlockedIncrement(a
)
# define gitrc_dec(a)
!InterlockedDecrement(a
)
# define gitrc_init(a, v)
(*a = v)
# define gitrc_inc(a)
(InterlockedIncrement(a)
)
# define gitrc_dec(a)
(!InterlockedDecrement(a)
)
# define gitrc_free(a) (void)0
# else
typedef
struct
{
git_lck
lock
;
int
counter
;
}
git_refcnt
;
...
...
@@ -98,7 +98,7 @@
# define gitlck_free(a) (void)0
typedef
struct
{
int
counter
;
}
git_refcnt
;
# define gitrc_init(a
) ((a)->counter = 0
)
# define gitrc_init(a
,v) ((a)->counter = v
)
# define gitrc_inc(a) ((a)->counter++)
# define gitrc_dec(a) (--(a)->counter == 0)
# define gitrc_free(a) (void)0
...
...
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