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
33358946
Commit
33358946
authored
Jun 15, 2019
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix various builds.
parent
5480b2aa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
arena.h
c++/src/capnp/arena.h
+1
-1
message.h
c++/src/capnp/message.h
+14
-3
No files found.
c++/src/capnp/arena.h
View file @
33358946
...
...
@@ -325,7 +325,7 @@ private:
MessageBuilder
*
message
;
ReadLimiter
dummyLimiter
;
class
LocalCapTable
:
public
CapTableBuilder
{
class
LocalCapTable
final
:
public
CapTableBuilder
{
#if !CAPNP_LITE
public
:
kj
::
Maybe
<
kj
::
Own
<
ClientHook
>>
extractCap
(
uint
index
)
override
;
...
...
c++/src/capnp/message.h
View file @
33358946
...
...
@@ -39,6 +39,7 @@ namespace capnp {
namespace
_
{
// private
class
ReaderArena
;
class
BuilderArena
;
struct
CloneImpl
;
}
class
StructSchema
;
...
...
@@ -258,8 +259,10 @@ private:
kj
::
Own
<
_
::
CapTableBuilder
>
releaseBuiltinCapTable
();
// Hack for clone() to extract the cap table.
template
<
typename
Reader
,
typename
>
friend
kj
::
Own
<
kj
::
Decay
<
Reader
>>
clone
(
Reader
&&
reader
);
friend
struct
_
::
CloneImpl
;
// We can't declare clone() as a friend directly because old versions of GCC incorrectly demand
// that the first declaration (even if it is a friend declaration) specify the default type args,
// whereas correct compilers do not permit default type args to be specified on a friend decl.
};
template
<
typename
RootType
>
...
...
@@ -516,6 +519,14 @@ static typename Type::Reader defaultValue() {
return
typename
Type
::
Reader
(
_
::
StructReader
());
}
namespace
_
{
struct
CloneImpl
{
static
inline
kj
::
Own
<
_
::
CapTableBuilder
>
releaseBuiltinCapTable
(
MessageBuilder
&
message
)
{
return
message
.
releaseBuiltinCapTable
();
}
};
};
template
<
typename
Reader
,
typename
>
kj
::
Own
<
kj
::
Decay
<
Reader
>>
clone
(
Reader
&&
reader
)
{
auto
size
=
reader
.
totalSize
();
...
...
@@ -529,7 +540,7 @@ kj::Own<kj::Decay<Reader>> clone(Reader&& reader) {
FlatMessageBuilder
builder
(
buffer
);
builder
.
setRoot
(
kj
::
fwd
<
Reader
>
(
reader
));
builder
.
requireFilled
();
auto
capTable
=
builder
.
releaseBuiltinCapTable
(
);
auto
capTable
=
_
::
CloneImpl
::
releaseBuiltinCapTable
(
builder
);
AnyPointer
::
Reader
raw
(
_
::
PointerReader
::
getRootUnchecked
(
buffer
.
begin
()).
imbue
(
capTable
));
return
kj
::
attachVal
(
raw
.
getAs
<
FromReader
<
Reader
>>
(),
kj
::
mv
(
buffer
),
kj
::
mv
(
capTable
));
}
...
...
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