Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
e5e3100d
Commit
e5e3100d
authored
Jul 25, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #22 from dwrensha/typos
typos
parents
0da57538
23538632
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
arena.c++
c++/src/capnp/arena.c++
+1
-1
runner.c++
c++/src/capnp/benchmark/runner.c++
+1
-1
common.h
c++/src/capnp/common.h
+1
-1
encoding-test.c++
c++/src/capnp/encoding-test.c++
+1
-1
No files found.
c++/src/capnp/arena.c++
View file @
e5e3100d
...
@@ -37,7 +37,7 @@ Arena::~Arena() noexcept(false) {}
...
@@ -37,7 +37,7 @@ Arena::~Arena() noexcept(false) {}
void
ReadLimiter
::
unread
(
WordCount64
amount
)
{
void
ReadLimiter
::
unread
(
WordCount64
amount
)
{
// Be careful not to overflow here. Since ReadLimiter has no thread-safety, it's possible that
// Be careful not to overflow here. Since ReadLimiter has no thread-safety, it's possible that
// the limit value was not updated correctly for one or more reads, and therefore unread() could
// the limit value was not updated correctly for one or more reads, and therefore unread() could
// overflow it even if it is only unreading bytes that were ac
ut
ally read.
// overflow it even if it is only unreading bytes that were ac
tu
ally read.
uint64_t
oldValue
=
limit
;
uint64_t
oldValue
=
limit
;
uint64_t
newValue
=
oldValue
+
amount
/
WORDS
;
uint64_t
newValue
=
oldValue
+
amount
/
WORDS
;
if
(
newValue
>
oldValue
)
{
if
(
newValue
>
oldValue
)
{
...
...
c++/src/capnp/benchmark/runner.c++
View file @
e5e3100d
...
@@ -434,7 +434,7 @@ int main(int argc, char* argv[]) {
...
@@ -434,7 +434,7 @@ int main(int argc, char* argv[]) {
break
;
break
;
case
Mode
:
:
BYTES
:
case
Mode
:
:
BYTES
:
cout
<<
"* in-memory I/O"
<<
endl
;
cout
<<
"* in-memory I/O"
<<
endl
;
cout
<<
" * with client an server in the same thread"
<<
endl
;
cout
<<
" * with client an
d
server in the same thread"
<<
endl
;
break
;
break
;
case
Mode
:
:
PIPE_SYNC
:
case
Mode
:
:
PIPE_SYNC
:
cout
<<
"* pipe I/O"
<<
endl
;
cout
<<
"* pipe I/O"
<<
endl
;
...
...
c++/src/capnp/common.h
View file @
e5e3100d
...
@@ -131,7 +131,7 @@ class word { uint64_t content KJ_UNUSED_MEMBER; KJ_DISALLOW_COPY(word); public:
...
@@ -131,7 +131,7 @@ class word { uint64_t content KJ_UNUSED_MEMBER; KJ_DISALLOW_COPY(word); public:
// arithmetic clearer. Since the contents are private, the only way to access them is to first
// arithmetic clearer. Since the contents are private, the only way to access them is to first
// reinterpret_cast to some other pointer type.
// reinterpret_cast to some other pointer type.
//
//
// Coping is disallowed because you should always use memcpy(). Otherwise, you may run afoul of
// Cop
y
ing is disallowed because you should always use memcpy(). Otherwise, you may run afoul of
// aliasing rules.
// aliasing rules.
//
//
// A pointer of type word* should always be word-aligned even if won't actually be dereferenced as
// A pointer of type word* should always be word-aligned even if won't actually be dereferenced as
...
...
c++/src/capnp/encoding-test.c++
View file @
e5e3100d
...
@@ -737,7 +737,7 @@ TEST(Encoding, UpgradeStructInBuilder) {
...
@@ -737,7 +737,7 @@ TEST(Encoding, UpgradeStructInBuilder) {
TEST
(
Encoding
,
UpgradeStructInBuilderMultiSegment
)
{
TEST
(
Encoding
,
UpgradeStructInBuilderMultiSegment
)
{
// Exactly like the previous test, except that we force multiple segments. Since we force a
// Exactly like the previous test, except that we force multiple segments. Since we force a
// separate segment for every object, every pointer is a far pointer, and far pointers are easily
// separate segment for every object, every pointer is a far pointer, and far pointers are easily
// transferred, so this is ac
ut
ally not such a complicated case.
// transferred, so this is ac
tu
ally not such a complicated case.
MallocMessageBuilder
builder
(
0
,
AllocationStrategy
::
FIXED_SIZE
);
MallocMessageBuilder
builder
(
0
,
AllocationStrategy
::
FIXED_SIZE
);
auto
root
=
builder
.
initRoot
<
test
::
TestObject
>
();
auto
root
=
builder
.
initRoot
<
test
::
TestObject
>
();
...
...
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