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
fe40de40
Commit
fe40de40
authored
Jul 22, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trace: drop unnecessary write indirection
parent
688bf4ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
src/trace.h
+6
-14
No files found.
src/trace.h
View file @
fe40de40
...
...
@@ -21,9 +21,10 @@ struct git_trace_data {
extern
struct
git_trace_data
git_trace__data
;
GIT_INLINE
(
void
)
git_trace__
v
write_fmt
(
GIT_INLINE
(
void
)
git_trace__write_fmt
(
git_trace_level_t
level
,
const
char
*
fmt
,
va_list
ap
)
const
char
*
fmt
,
va_list
ap
)
{
git_trace_cb
callback
=
git_trace__data
.
callback
;
git_buf
message
=
GIT_BUF_INIT
;
...
...
@@ -35,18 +36,8 @@ GIT_INLINE(void) git_trace__vwrite_fmt(
git_buf_dispose
(
&
message
);
}
GIT_INLINE
(
void
)
git_trace__write_fmt
(
git_trace_level_t
level
,
const
char
*
fmt
,
...)
{
va_list
ap
;
va_start
(
ap
,
fmt
);
git_trace__vwrite_fmt
(
level
,
fmt
,
ap
);
va_end
(
ap
);
}
#define git_trace_level() (git_trace__data.level)
GIT_INLINE
(
void
)
git_trace
(
git_trace_level_t
level
,
const
char
*
fmt
,
...)
{
if
(
git_trace__data
.
level
>=
level
&&
...
...
@@ -54,10 +45,11 @@ GIT_INLINE(void) git_trace(git_trace_level_t level, const char *fmt, ...)
va_list
ap
;
va_start
(
ap
,
fmt
);
git_trace__
v
write_fmt
(
level
,
fmt
,
ap
);
git_trace__write_fmt
(
level
,
fmt
,
ap
);
va_end
(
ap
);
}
}
#else
GIT_INLINE
(
void
)
git_trace__null
(
...
...
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