Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
de07102f
Commit
de07102f
authored
13 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Plain Diff
Merge branch 'master-stable'
parents
a9a8f931
a9890515
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
core/admin.m
+1
-2
1 addition, 2 deletions
core/admin.m
core/admin.rl
+1
-2
1 addition, 2 deletions
core/admin.rl
core/tbuf.m
+12
-0
12 additions, 0 deletions
core/tbuf.m
include/tbuf.h
+10
-0
10 additions, 0 deletions
include/tbuf.h
with
24 additions
and
4 deletions
core/admin.m
+
1
−
2
View file @
de07102f
...
...
@@ -1452,8 +1452,7 @@ case 107:
#line 199 "core/admin.rl"
fiber->rbuf->len -= (void *)pe - (void *)fiber->rbuf->data;
fiber->rbuf->data = pe;
tbuf_ltrim(fiber->rbuf, (void *)pe - (void *)fiber->rbuf->data);
if (p != pe) {
start(out);
...
...
This diff is collapsed.
Click to expand it.
core/admin.rl
+
1
−
2
View file @
de07102f
...
...
@@ -198,8 +198,7 @@ admin_dispatch(void)
write
exec
;
}
%%
fiber
->
rbuf
->
len
-=
(
void
*
)
pe
-
(
void
*
)
fiber
->
rbuf
->
data
;
fiber
->
rbuf
->
data
=
pe
;
tbuf_ltrim
(
fiber
->
rbuf
,
(
void
*
)
pe
-
(
void
*
)
fiber
->
rbuf
->
data
);
if
(
p
!=
pe
)
{
start
(
out
);
...
...
This diff is collapsed.
Click to expand it.
core/tbuf.m
+
12
−
0
View file @
de07102f
...
...
@@ -125,6 +125,18 @@ tbuf_peek(struct tbuf *b, size_t count)
return NULL;
}
/** Remove first count bytes from the beginning. */
void
tbuf_ltrim(struct tbuf *b, size_t count)
{
tbuf_assert(b);
assert(count <= b->len);
memmove(b->data, b->data + count, b->len - count);
b->len -= count;
}
size_t
tbuf_reserve(struct tbuf *b, size_t count)
{
...
...
This diff is collapsed.
Click to expand it.
include/tbuf.h
+
10
−
0
View file @
de07102f
...
...
@@ -63,6 +63,16 @@ size_t tbuf_reserve(struct tbuf *b, size_t count);
void
tbuf_reset
(
struct
tbuf
*
b
);
void
*
tbuf_peek
(
struct
tbuf
*
b
,
size_t
count
);
/**
* Remove count bytes from the beginning, and adjust all sizes
* accordingly.
*
* @param count the number of bytes to forget about.
*
* @pre 0 <= count <= tbuf->len
*/
void
tbuf_ltrim
(
struct
tbuf
*
b
,
size_t
count
);
void
tbuf_append_field
(
struct
tbuf
*
b
,
void
*
f
);
void
tbuf_vprintf
(
struct
tbuf
*
b
,
const
char
*
format
,
va_list
ap
)
__attribute__
((
format
(
FORMAT_PRINTF
,
2
,
0
)));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment