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
9837177b
Commit
9837177b
authored
Jan 25, 2014
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some tweaks made while working on v8 bindings.
parent
7644d6b1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
capability.c++
c++/src/capnp/capability.c++
+1
-1
compiler.c++
c++/src/capnp/compiler/compiler.c++
+10
-0
dynamic.h
c++/src/capnp/dynamic.h
+2
-3
exception.h
c++/src/kj/exception.h
+1
-0
No files found.
c++/src/capnp/capability.c++
View file @
9837177b
...
...
@@ -585,7 +585,7 @@ public:
VoidPromiseAndPipeline
call
(
uint64_t
interfaceId
,
uint16_t
methodId
,
kj
::
Own
<
CallContextHook
>&&
context
)
override
{
return
VoidPromiseAndPipeline
{
kj
::
cp
(
exception
),
kj
::
heap
<
BrokenPipeline
>
(
exception
)
};
return
VoidPromiseAndPipeline
{
kj
::
cp
(
exception
),
kj
::
refcounted
<
BrokenPipeline
>
(
exception
)
};
}
kj
::
Maybe
<
ClientHook
&>
getResolved
()
{
...
...
c++/src/capnp/compiler/compiler.c++
View file @
9837177b
...
...
@@ -488,6 +488,16 @@ kj::Maybe<Compiler::Node::Content&> Compiler::Node::getContent(Content::State mi
auto
builder
=
schemaNode
.
get
();
builder
.
setId
(
id
);
builder
.
setDisplayName
(
displayName
);
// TODO(cleanup): Would be better if we could remember the prefix length from before we
// added this decl's name to the end.
KJ_IF_MAYBE
(
lastDot
,
displayName
.
findLast
(
'.'
))
{
builder
.
setDisplayNamePrefixLength
(
*
lastDot
+
1
);
}
KJ_IF_MAYBE
(
lastColon
,
displayName
.
findLast
(
':'
))
{
if
(
*
lastColon
>
builder
.
getDisplayNamePrefixLength
())
{
builder
.
setDisplayNamePrefixLength
(
*
lastColon
+
1
);
}
}
KJ_IF_MAYBE
(
p
,
parent
)
{
builder
.
setScopeId
(
p
->
id
);
}
...
...
c++/src/capnp/dynamic.h
View file @
9837177b
...
...
@@ -117,6 +117,8 @@ public:
DynamicEnum
()
=
default
;
inline
DynamicEnum
(
EnumSchema
::
Enumerant
enumerant
)
:
schema
(
enumerant
.
getContainingEnum
()),
value
(
enumerant
.
getOrdinal
())
{}
inline
DynamicEnum
(
EnumSchema
schema
,
uint16_t
value
)
:
schema
(
schema
),
value
(
value
)
{}
template
<
typename
T
,
typename
=
kj
::
EnableIf
<
kind
<
T
>
()
==
Kind
::
ENUM
>>
inline
DynamicEnum
(
T
&&
value
)
:
DynamicEnum
(
toDynamic
(
value
))
{}
...
...
@@ -139,9 +141,6 @@ private:
EnumSchema
schema
;
uint16_t
value
;
inline
DynamicEnum
(
EnumSchema
schema
,
uint16_t
value
)
:
schema
(
schema
),
value
(
value
)
{}
uint16_t
asImpl
(
uint64_t
requestedTypeId
)
const
;
friend
struct
DynamicStruct
;
...
...
c++/src/kj/exception.h
View file @
9837177b
...
...
@@ -125,6 +125,7 @@ private:
friend
class
ExceptionImpl
;
};
// TODO(soon): These should return StringPtr.
ArrayPtr
<
const
char
>
KJ_STRINGIFY
(
Exception
::
Nature
nature
);
ArrayPtr
<
const
char
>
KJ_STRINGIFY
(
Exception
::
Durability
durability
);
String
KJ_STRINGIFY
(
const
Exception
&
e
);
...
...
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