Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
tci-gateway-module
Grpc
Commits
f99dbf5d
Commit
f99dbf5d
authored
9 years ago
by
Sree Kuchibhotla
Browse files
Options
Downloads
Patches
Plain Diff
Remove gpr_slice_to_cstring as it is not used anywhere
parent
38d39f46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/grpc/support/slice.h
+0
-4
0 additions, 4 deletions
include/grpc/support/slice.h
src/core/support/slice.c
+0
-7
0 additions, 7 deletions
src/core/support/slice.c
test/core/support/slice_test.c
+0
-1
0 additions, 1 deletion
test/core/support/slice_test.c
with
0 additions
and
12 deletions
include/grpc/support/slice.h
+
0
−
4
View file @
f99dbf5d
...
...
@@ -175,10 +175,6 @@ gpr_slice gpr_empty_slice(void);
int
gpr_slice_cmp
(
gpr_slice
a
,
gpr_slice
b
);
int
gpr_slice_str_cmp
(
gpr_slice
a
,
const
char
*
b
);
/* Returns a c-string representation of a slice. Useful for logging or debugging
purposes only. The string representation can change in future */
char
*
gpr_slice_to_cstring
(
gpr_slice
slice
);
#ifdef __cplusplus
}
#endif
...
...
This diff is collapsed.
Click to expand it.
src/core/support/slice.c
+
0
−
7
View file @
f99dbf5d
...
...
@@ -341,10 +341,3 @@ int gpr_slice_str_cmp(gpr_slice a, const char *b) {
if
(
d
!=
0
)
return
d
;
return
memcmp
(
GPR_SLICE_START_PTR
(
a
),
b
,
b_length
);
}
char
*
gpr_slice_to_cstring
(
gpr_slice
slice
)
{
char
*
result
=
gpr_malloc
(
GPR_SLICE_LENGTH
(
slice
)
+
1
);
memcpy
(
result
,
GPR_SLICE_START_PTR
(
slice
),
GPR_SLICE_LENGTH
(
slice
));
result
[
GPR_SLICE_LENGTH
(
slice
)]
=
'\0'
;
return
result
;
}
This diff is collapsed.
Click to expand it.
test/core/support/slice_test.c
+
0
−
1
View file @
f99dbf5d
...
...
@@ -221,7 +221,6 @@ static void test_slice_from_copied_string_works(void) {
LOG_TEST_NAME
(
"test_slice_from_copied_string_works"
);
slice
=
gpr_slice_from_copied_string
(
text
);
gpr_log
(
GPR_INFO
,
"slice: %s"
,
gpr_slice_to_cstring
(
slice
));
GPR_ASSERT
(
strlen
(
text
)
==
GPR_SLICE_LENGTH
(
slice
));
GPR_ASSERT
(
0
==
memcmp
(
text
,
GPR_SLICE_START_PTR
(
slice
),
GPR_SLICE_LENGTH
(
slice
)));
...
...
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