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
4cbb1a4d
Commit
4cbb1a4d
authored
May 31, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Makefile.am
parent
36c3f8e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
19 deletions
+30
-19
Makefile.am
c++/Makefile.am
+27
-17
serialize-packed.c++
c++/src/capnproto/serialize-packed.c++
+1
-2
common-test.c++
c++/src/kj/common-test.c++
+2
-0
No files found.
c++/Makefile.am
View file @
4cbb1a4d
...
...
@@ -61,11 +61,20 @@ capnpc_middleman:
$(capnpc_outputs)
:
capnpc_middleman
includecapnpdir
=
$(includedir)
/capnproto
includekjdir
=
$(includedir)
/capnproto
includekj_HEADERS
=
\
src/kj/common.h
\
src/kj/type-safety.h
\
src/kj/memory.h
\
src/kj/array.h
\
src/kj/string.h
\
src/kj/exception.h
\
src/kj/logging.h
\
src/kj/io.h
includecapnp_HEADERS
=
\
src/capnproto/macros.h
\
src/capnproto/type-safety.h
\
src/capnproto/exception.h
\
src/capnproto/common.h
\
src/capnproto/blob.h
\
src/capnproto/layout.h
\
src/capnproto/list.h
\
...
...
@@ -73,8 +82,6 @@ includecapnp_HEADERS = \
src/capnproto/schema.h
\
src/capnproto/schema-loader.h
\
src/capnproto/dynamic.h
\
src/capnproto/stringify.h
\
src/capnproto/io.h
\
src/capnproto/serialize.h
\
src/capnproto/serialize-packed.h
\
src/capnproto/generated-header-support.h
...
...
@@ -87,13 +94,14 @@ nodist_includecapnp_HEADERS = \
lib_LIBRARIES
=
libcapnproto.a
libcapnproto_a_SOURCES
=
\
src/capnproto/macros.c++
\
src/capnproto/type-safety.c++
\
src/capnproto/exception.c++
\
src/capnproto/util.h
\
src/capnproto/util.c++
\
src/capnproto/logging.h
\
src/capnproto/logging.c++
\
src/kj/common.c++
\
src/kj/type-safety.c++
\
src/kj/memory.c++
\
src/kj/array.c++
\
src/kj/string.c++
\
src/kj/exception.c++
\
src/kj/logging.c++
\
src/kj/io.c++
\
src/capnproto/blob.c++
\
src/capnproto/arena.h
\
src/capnproto/arena.c++
\
...
...
@@ -104,7 +112,6 @@ libcapnproto_a_SOURCES= \
src/capnproto/schema-loader.c++
\
src/capnproto/dynamic.c++
\
src/capnproto/stringify.c++
\
src/capnproto/io.c++
\
src/capnproto/serialize.c++
\
src/capnproto/serialize-packed.c++
nodist_libcapnproto_a_SOURCES
=
\
...
...
@@ -113,6 +120,7 @@ nodist_libcapnproto_a_SOURCES = \
# Source files intentionally not included in the dist at this time:
# src/capnproto/serialize-snappy*
# src/capnproto/benchmark/...
# src/capnproto/compiler/...
# Tests ==============================================================
...
...
@@ -141,10 +149,12 @@ BUILT_SOURCES = $(test_capnpc_outputs) $(capnpc_outputs)
check_PROGRAMS
=
capnproto-test
capnproto_test_LDADD
=
-lgtest
-lgtest_main
libcapnproto.a
capnproto_test_SOURCES
=
\
src/capnproto/type-safety-test.c++
\
src/kj/array-test.c++
\
src/kj/common-test.c++
\
src/kj/logging-test.c++
\
src/kj/string-test.c++
\
src/kj/type-safety-test.c++
\
src/capnproto/blob-test.c++
\
src/capnproto/util-test.c++
\
src/capnproto/logging-test.c++
\
src/capnproto/layout-test.c++
\
src/capnproto/message-test.c++
\
src/capnproto/schema-test.c++
\
...
...
c++/src/capnproto/serialize-packed.c++
View file @
4cbb1a4d
...
...
@@ -467,8 +467,7 @@ void writePackedMessage(kj::BufferedOutputStream& output,
void
writePackedMessage
(
kj
::
OutputStream
&
output
,
kj
::
ArrayPtr
<
const
kj
::
ArrayPtr
<
const
word
>>
segments
)
{
if
(
kj
::
BufferedOutputStream
*
bufferedOutputPtr
=
dynamic_cast
<
kj
::
BufferedOutputStream
*>
(
&
output
))
{
KJ_IF_MAYBE
(
bufferedOutputPtr
,
kj
::
dynamicDowncastIfAvailable
<
kj
::
BufferedOutputStream
>
(
output
))
{
writePackedMessage
(
*
bufferedOutputPtr
,
segments
);
}
else
{
byte
buffer
[
8192
];
...
...
c++/src/kj/common-test.c++
View file @
4cbb1a4d
...
...
@@ -173,8 +173,10 @@ TEST(Common, Downcast) {
EXPECT_EQ
(
&
bar
,
&
downcast
<
Bar
&>
(
foo
));
EXPECT_EQ
(
&
bar
,
downcast
<
Bar
*>
(
&
foo
));
#if !defined(NDEBUG) && !KJ_NO_RTTI
EXPECT_ANY_THROW
(
downcast
<
Baz
&>
(
foo
));
EXPECT_ANY_THROW
(
downcast
<
Baz
*>
(
&
foo
));
#endif
#if KJ_NO_RTTI
EXPECT_TRUE
(
dynamicDowncastIfAvailable
<
Bar
&>
(
foo
)
==
nullptr
);
...
...
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