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
bf6d2717
Commit
bf6d2717
authored
Dec 14, 2011
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
buffer: inline `git_buf_cstr`
parent
7af26f8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
src/buffer.c
+0
-5
src/buffer.h
+7
-2
No files found.
src/buffer.c
View file @
bf6d2717
...
@@ -175,11 +175,6 @@ int git_buf_printf(git_buf *buf, const char *format, ...)
...
@@ -175,11 +175,6 @@ int git_buf_printf(git_buf *buf, const char *format, ...)
return
GIT_SUCCESS
;
return
GIT_SUCCESS
;
}
}
const
char
*
git_buf_cstr
(
git_buf
*
buf
)
{
return
buf
->
ptr
;
}
void
git_buf_copy_cstr
(
char
*
data
,
size_t
datasize
,
const
git_buf
*
buf
)
void
git_buf_copy_cstr
(
char
*
data
,
size_t
datasize
,
const
git_buf
*
buf
)
{
{
size_t
copylen
;
size_t
copylen
;
...
...
src/buffer.h
View file @
bf6d2717
...
@@ -92,12 +92,17 @@ int git_buf_join(git_buf *buf, char separator, const char *str_a, const char *st
...
@@ -92,12 +92,17 @@ int git_buf_join(git_buf *buf, char separator, const char *str_a, const char *st
* Join two strings as paths, inserting a slash between as needed.
* Join two strings as paths, inserting a slash between as needed.
* @return error code or GIT_SUCCESS
* @return error code or GIT_SUCCESS
*/
*/
GIT_INLINE
(
int
)
git_buf_joinpath
(
git_buf
*
buf
,
const
char
*
a
,
const
char
*
b
)
GIT_INLINE
(
int
)
git_buf_joinpath
(
git_buf
*
buf
,
const
char
*
a
,
const
char
*
b
)
{
{
return
git_buf_join
(
buf
,
'/'
,
a
,
b
);
return
git_buf_join
(
buf
,
'/'
,
a
,
b
);
}
}
const
char
*
git_buf_cstr
(
git_buf
*
buf
);
GIT_INLINE
(
const
char
*
)
git_buf_cstr
(
git_buf
*
buf
)
{
return
buf
->
ptr
;
}
void
git_buf_copy_cstr
(
char
*
data
,
size_t
datasize
,
const
git_buf
*
buf
);
void
git_buf_copy_cstr
(
char
*
data
,
size_t
datasize
,
const
git_buf
*
buf
);
#define git_buf_PUTS(buf, str) git_buf_put(buf, str, sizeof(str) - 1)
#define git_buf_PUTS(buf, str) git_buf_put(buf, str, sizeof(str) - 1)
...
...
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