Commit graph

188 commits

Author SHA1 Message Date
Liam Staskawicz
fadac15a4c init_fp(): add comment that clarifies that it expects input to be in standard framing format 2015-08-04 11:56:18 -07:00
Liam Staskawicz
560366c7d4 compiler: introduce workaround for annotation ids in nestednode list (see comments), and regenerate schema .{c|h} files based on capnproto v0.5.2 2015-08-04 11:56:00 -07:00
Liam Staskawicz
98c2d02744 compiler: update schemas from v0.5.2 2015-08-04 11:55:23 -07:00
Liam Staskawicz
593b356cda Merge pull request #2 from liamstask/travis-improvement
travis: remove sudo requirement for faster builds
2015-08-04 11:14:21 -07:00
Liam Staskawicz
e3af4b4570 travis: remove sudo requirement in order to be able to build on faster container system 2015-08-04 11:11:54 -07:00
Liam Staskawicz
8585d869cb readme: super brief info 2015-08-04 11:00:26 -07:00
Liam Staskawicz
be7a4963a3 Merge pull request #1 from liamstask/travis-clean
Travis build support
2015-08-04 10:57:47 -07:00
Liam Staskawicz
0b6f95294e all: use unsigned types for more variables that represent length
resolve build warnings on multiple platforms/toolchains
2015-08-04 10:44:22 -07:00
Liam Staskawicz
125c638c11 unreal: gcc complains about missing ‘ character in #if 0 block 2015-08-04 10:25:08 -07:00
Liam Staskawicz
28e13e55d7 build: require c++11 for gtest, and link test exe against pthreads (linux build fails without it) 2015-08-04 10:24:57 -07:00
Liam Staskawicz
94de39fd6b travis: prelim auto build support 2015-08-04 10:21:22 -07:00
Liam Staskawicz
6b3657437d capn-test: remove unreferenced code, now builds cleanly
previously, this was emitting the following warning (treated as error):

`c++ -g -Wall -Werror -I. -Igtest-1.7.0/include -o capn-test.o -c capn-test.cpp
capn-test.cpp:66:29: error: unused variable 'SUBSTRUCT_DEFAULT' [-Werror,-Wunused-const-variable]
static const AlignedData<2> SUBSTRUCT_DEFAULT = {{0,0,0,0,1,0,0,0,  0,0,0,0,0,0,0,0}};
                            ^
capn-test.cpp:67:29: error: unused variable 'STRUCTLIST_ELEMENT_SUBSTRUCT_DEFAULT' [-Werror,-Wunused-const-variable]
static const AlignedData<2> STRUCTLIST_ELEMENT_SUBSTRUCT_DEFAULT =
                            ^`
2015-07-29 22:48:23 -07:00
Liam Staskawicz
97dcc053ef gtest: remove modified gtest-all-test.cpp, and build unmodified, vendored gtest-all.cpp
builds cleanly (minus a couple warnings in the test code itself) on OS X 10.10.4 with “Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)”
2015-07-29 22:45:20 -07:00
Liam Staskawicz
8865b6d917 gtest: vendor v1.7.0, latest release from https://code.google.com/p/googletest/downloads/list
no changes to existing code
2015-07-29 22:40:30 -07:00
Greg Sherwood
c653dda6a0 added symlink to gtest-all-test 2015-01-04 10:58:44 -06:00
Greg Sherwood
232cef8ffa some compile cleanup 2015-01-04 10:55:04 -06:00
Baruch Even
2bdc5c476a Implement capn_write_fd 2014-08-07 17:56:51 +03:00
Baruch Even
440c662c66 Implement packed memory write
This uses the capn_deflate function.

The current use may get smaller packing than the maximum possible due to
the inability to peak around segments as it packs each segment on its
own. This saves time compared to copying everything into one place and
saves effort by not requiring to change the interface of capn_deflate to
support multiple different buffers.

It should be possible to make the capn_deflate state machine better to
handle the multiple buffers case too.
2014-08-06 22:29:51 +03:00
Baruch Even
a83769f44d Fix use of wrong offset in buffer
The header of packing is a single byte and nothing was written to the
first byte anyway.
2014-08-06 22:28:24 +03:00
Baruch Even
24ec009d67 Use constants where possible
The hdr variable gets the same constants as value but it is easier to
understand that the constants are used than the hdr which needs to be
traced to the value it received.
2014-08-06 22:28:24 +03:00
Baruch Even
a46581a35e Move initialization closer to use
Should make it a bit more readable, the variable is used before that
case as well but doesn't require the zero initialization in that case.
2014-08-06 22:28:24 +03:00
Baruch Even
0071546cd2 Add comments 2014-08-06 22:28:24 +03:00
Baruch Even
49483a6bbd Forego updating sz in capn_write_mem
It is not used and we already validated the total buffer size
beforehand.
2014-08-06 22:28:24 +03:00
Baruch Even
d785521932 Recompile capnpc schemas for capnpc 0.4 2014-08-03 23:22:28 +03:00
Baruch Even
8a33a1864a Add a README.md file 2014-08-03 23:07:34 +03:00
Baruch Even
54ca88f6ac Simpler makefile
No real need to build a gtest archive, gtest-all.cc includes all the
files so a single .o is fine.
2014-08-03 22:28:41 +03:00
Baruch Even
20bd625dc2 Fix build
Renamed gtest/include to gtest/gtest since that's what the include files
expected.

Adjusted the Makefile to work through it all.
2014-08-03 22:18:08 +03:00
Johan De Claville Christiansen
4cc7785d53 Added eclipse output files to git ignore 2014-03-25 19:13:56 +01:00
Johan De Claville Christiansen
d84a635fb0 Fixed compilation by removing 32-bit padding 2014-03-25 19:12:58 +01:00
Johan De Claville Christiansen
bf5eb7f92c Added gtest 1.6.0, since the included version lacked the headers 2014-03-25 18:55:18 +01:00
Johan De Claville Christiansen
1eb82b0f4a Added install target 2014-03-25 18:00:41 +01:00
Johan De Claville Christiansen
1d79a28091 Fixed: missing terminating ' character 2014-03-25 17:50:39 +01:00
Steven Dee
cb26aeac8d Add padding to preserve alignment on 32-bit systems 2014-02-26 02:03:17 +00:00
Steven Dee
823a820e87 Initialize x and y unconditionally
Fixes a compiler warning.
2014-02-26 01:24:50 +00:00
Steve Dee
89f1ac3953 Merge remote-tracking branch 'urbit/master'
Conflicts:
	capn-malloc.c
2014-02-24 10:19:39 -08:00
James McKaskill
36348a2375 Merge pull request #2 from urbit/capn-write
Add TODO and fail on packed writes
2014-02-21 16:59:31 -05:00
Steve Dee
45b95c38d0 Add TODO and fail on packed writes 2014-02-21 13:23:57 -08:00
James McKaskill
9019ca2326 Merge pull request #1 from urbit/capn-write
Implement serialization to buffers
2014-02-20 20:38:20 -05:00
Steve Dee
ca03b34318 Implement serialization to buffers 2014-02-20 17:13:57 -08:00
Steve Dee
68340f87c1 Implement serialization to buffers 2014-02-20 17:12:59 -08:00
Steve Dee
322aa16624 Ignore capn.a 2014-02-05 15:25:18 -08:00
Steve Dee
f0dc17cede Static capnpc-c 2014-02-05 15:05:26 -08:00
Steve Dee
859ab61a07 Add capn.a target 2014-02-05 14:02:35 -08:00
James McKaskill
2c48f47b3d clean up of write_ptr 2013-12-10 20:34:04 -05:00
James McKaskill
df3e668f79 Integrate gtest in rather than use gtest-config 2013-12-10 20:33:33 -05:00
James McKaskill
ff44e4df26 remove CAPN_COMPOSITE_LIST and add capn_len 2013-09-16 16:53:33 -04:00
James McKaskill
59f827e93d change ptrsz to ptrs to free up space in capn_ptr 2013-09-13 10:02:03 -04:00
James McKaskill
7397df1216 misc minor cleanup 2013-09-12 23:57:29 -04:00
James McKaskill
7b0bfece26 add version checks 2013-09-12 23:28:36 -04:00
James McKaskill
fc63a080a0 Add special case for capn_setp when handed a far pointer 2013-09-12 23:20:58 -04:00