Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
04557898
Commit
04557898
authored
Jan 17, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src: Update doc
parent
d16ff1f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
src/template.h
src/template.h
+9
-0
No files found.
src/template.h
View file @
04557898
...
...
@@ -199,6 +199,10 @@ inline std::unique_ptr<char[]> strcopy(const std::unique_ptr<char[]> &val) {
return
strcopy
(
val
.
get
());
}
// VString represents string. It has c_str() and size() functions to
// mimic std::string. It manages buffer by itself. Just like
// std::string, c_str() returns NULL-terminated string, but NULL
// character may appear before the final terminal NULL.
struct
VString
{
VString
()
:
len
(
0
)
{}
VString
(
const
char
*
s
,
size_t
slen
)
:
base
(
strcopy
(
s
)),
len
(
slen
)
{}
...
...
@@ -226,6 +230,11 @@ struct VString {
size_t
len
;
};
// StringAdaptor behaves like simple string, but it does not own
// pointer. When it is default constructed, it has empty string. You
// can freely copy or move around this struct, but never free its
// pointer. str() function can be used to export the content as
// std::string.
struct
StringAdaptor
{
StringAdaptor
()
:
base
(
""
),
len
(
0
)
{}
template
<
typename
T
>
...
...
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