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
f16fb099
Commit
f16fb099
authored
Mar 15, 2013
by
Vicent Marti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pool: Internal struct name
parent
5b229e20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/pool.c
+5
-6
No files found.
src/pool.c
View file @
f16fb099
...
@@ -10,9 +10,8 @@ struct git_pool_page {
...
@@ -10,9 +10,8 @@ struct git_pool_page {
char
data
[
GIT_FLEX_ARRAY
];
char
data
[
GIT_FLEX_ARRAY
];
};
};
typedef
struct
git_pool_freelist_item
git_pool_freelist_item
;
struct
pool_freelist
{
struct
git_pool_freelist_item
{
struct
pool_freelist
*
next
;
git_pool_freelist_item
*
next
;
};
};
#define GIT_POOL_MIN_USABLE 4
#define GIT_POOL_MIN_USABLE 4
...
@@ -155,7 +154,7 @@ void *git_pool_malloc(git_pool *pool, uint32_t items)
...
@@ -155,7 +154,7 @@ void *git_pool_malloc(git_pool *pool, uint32_t items)
pool
->
has_multi_item_alloc
=
1
;
pool
->
has_multi_item_alloc
=
1
;
else
if
(
pool
->
free_list
!=
NULL
)
{
else
if
(
pool
->
free_list
!=
NULL
)
{
ptr
=
pool
->
free_list
;
ptr
=
pool
->
free_list
;
pool
->
free_list
=
((
git_pool_freelist_item
*
)
pool
->
free_list
)
->
next
;
pool
->
free_list
=
((
struct
pool_freelist
*
)
pool
->
free_list
)
->
next
;
return
ptr
;
return
ptr
;
}
}
...
@@ -240,7 +239,7 @@ char *git_pool_strcat(git_pool *pool, const char *a, const char *b)
...
@@ -240,7 +239,7 @@ char *git_pool_strcat(git_pool *pool, const char *a, const char *b)
void
git_pool_free
(
git_pool
*
pool
,
void
*
ptr
)
void
git_pool_free
(
git_pool
*
pool
,
void
*
ptr
)
{
{
git_pool_freelist_item
*
item
=
ptr
;
struct
pool_freelist
*
item
=
ptr
;
assert
(
pool
&&
pool
->
item_size
>=
sizeof
(
void
*
));
assert
(
pool
&&
pool
->
item_size
>=
sizeof
(
void
*
));
...
@@ -252,7 +251,7 @@ void git_pool_free(git_pool *pool, void *ptr)
...
@@ -252,7 +251,7 @@ void git_pool_free(git_pool *pool, void *ptr)
void
git_pool_free_array
(
git_pool
*
pool
,
size_t
count
,
void
**
ptrs
)
void
git_pool_free_array
(
git_pool
*
pool
,
size_t
count
,
void
**
ptrs
)
{
{
git_pool_freelist_item
**
items
=
(
git_pool_freelist_item
**
)
ptrs
;
struct
pool_freelist
**
items
=
(
struct
pool_freelist
**
)
ptrs
;
size_t
i
;
size_t
i
;
assert
(
pool
&&
ptrs
&&
pool
->
item_size
>=
sizeof
(
void
*
));
assert
(
pool
&&
ptrs
&&
pool
->
item_size
>=
sizeof
(
void
*
));
...
...
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