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
7339ac72
Commit
7339ac72
authored
Aug 30, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug when schema validation fails with -fno-exceptions.
parent
520e5c02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
schema-loader.c++
c++/src/capnp/schema-loader.c++
+7
-5
No files found.
c++/src/capnp/schema-loader.c++
View file @
7339ac72
...
...
@@ -60,7 +60,8 @@ public:
_
::
RawSchema
*
loadNative
(
const
_
::
RawSchema
*
nativeSchema
);
_
::
RawSchema
*
loadEmpty
(
uint64_t
id
,
kj
::
StringPtr
name
,
schema
::
Node
::
Which
kind
);
_
::
RawSchema
*
loadEmpty
(
uint64_t
id
,
kj
::
StringPtr
name
,
schema
::
Node
::
Which
kind
,
bool
isPlaceholder
);
// Create a dummy empty schema of the given kind for the given id and load it.
struct
TryGetResult
{
...
...
@@ -495,7 +496,7 @@ private:
}
dependencies
.
insert
(
std
::
make_pair
(
id
,
loader
.
loadEmpty
(
id
,
kj
::
str
(
"(unknown type used by "
,
nodeName
,
")"
),
expectedKind
)));
id
,
kj
::
str
(
"(unknown type used by "
,
nodeName
,
")"
),
expectedKind
,
true
)));
}
#undef VALIDATE_SCHEMA
...
...
@@ -1128,7 +1129,8 @@ _::RawSchema* SchemaLoader::Impl::load(const schema::Node::Reader& reader, bool
// Not valid. Construct an empty schema of the same type and return that.
return
loadEmpty
(
validatedReader
.
getId
(),
validatedReader
.
getDisplayName
(),
validatedReader
.
which
());
validatedReader
.
which
(),
false
);
}
// Check if we already have a schema for this ID.
...
...
@@ -1253,7 +1255,7 @@ _::RawSchema* SchemaLoader::Impl::loadNative(const _::RawSchema* nativeSchema) {
}
_
::
RawSchema
*
SchemaLoader
::
Impl
::
loadEmpty
(
uint64_t
id
,
kj
::
StringPtr
name
,
schema
::
Node
::
Which
kind
)
{
uint64_t
id
,
kj
::
StringPtr
name
,
schema
::
Node
::
Which
kind
,
bool
isPlaceholder
)
{
word
scratch
[
32
];
memset
(
scratch
,
0
,
sizeof
(
scratch
));
MallocMessageBuilder
builder
(
scratch
);
...
...
@@ -1272,7 +1274,7 @@ _::RawSchema* SchemaLoader::Impl::loadEmpty(
break
;
}
return
load
(
node
,
true
);
return
load
(
node
,
isPlaceholder
);
}
SchemaLoader
::
Impl
::
TryGetResult
SchemaLoader
::
Impl
::
tryGet
(
uint64_t
typeId
)
const
{
...
...
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