Commit graph

50 commits

Author SHA1 Message Date
David Lamparter
e9df12b387 don't write out empty structs
"struct { } foo" is not valid ISO C99; while gcc/clang/icc support it,
other compilers and tools don't (e.g. pycparser)
2016-04-06 14:18:29 -03:00
Michael Gartsbein
61a43a4998 static const instead of function in size getters 2016-03-29 10:25:33 +03:00
Michael Gartsbein
e870b5d605 generate setter and getter 2016-03-27 16:35:11 +03:00
David Lamparter
4de69a555d test.schema: drop interface & generic, regenerate 2016-03-19 00:46:05 +01:00
David Lamparter
7ecadefbfd compiler: fix remaining warnings 2016-03-19 00:39:30 +01:00
David Lamparter
811d3046e1 rename to "[lib]capnp_c", use lib/ subdir 2016-03-19 00:39:29 +01:00
David Lamparter
d3b1cad50f compiler: regenerate schema.c with enum/int cast 2016-03-19 00:39:25 +01:00
David Lamparter
41462901df lib: fix warning on uint16->enum cast 2016-03-19 00:36:24 +01:00
David Lamparter
ae746a3e08 add approprate per-file license headers 2016-02-28 12:47:42 +01:00
David Lamparter
b55d847db6 Re-fix signed/unsigned warnings 2016-02-28 12:42:52 +01:00
David Lamparter
02268ff818 Merge branch 'kylemanna' into merge
Conflicts: (manually resolved)
	capn-malloc.c
	capn-stream.c
	capn-test.cpp
	capn.c
	capn.h
	compiler/capnpc-c.c
2016-02-28 12:32:59 +01:00
David Lamparter
0ddba4f2f1 Merge branch 'baruch' into merge
Conflicts:
	Makefile		-- manually resolved
	compiler/schema.capnp	-- used from liamstask
	compiler/test.capnp	-- used from liamstask
2016-02-28 12:17:57 +01:00
Kyle Manna
376b63fb81 signedness: Fix less obvious issues
* My compilers mark these as errors
* Attempt to be more correct
* Tested on gcc-5.2.0 and clang-3.6.2
2015-08-17 18:52:36 -07:00
Kyle Manna
e933510236 compiler: Fix missing comments
* Later versions of compilers/pre-processors are upset about the syntax
* Bracket unterminated string with proper comment tags
2015-08-17 18:50:53 -07:00
Kyle Manna
7d2e122f2f signedness: Fix obvious sign problems
* These should be easily verified as correct.
* Tested on gcc-5.2.0 and clang-3.6.2
2015-08-17 18:48:17 -07:00
Liam Staskawicz
cdf7e1f007 compiler: notes on updating from upstream 2015-08-04 12:04:49 -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
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
Baruch Even
d785521932 Recompile capnpc schemas for capnpc 0.4 2014-08-03 23:22:28 +03: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
1d79a28091 Fixed: missing terminating ' character 2014-03-25 17:50:39 +01: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
7b0bfece26 add version checks 2013-09-12 23:28:36 -04:00
James McKaskill
081c783bbf don't autoresolve pointers 2013-09-12 17:26:51 -04:00
James McKaskill
bba43e67ea Add test schema 2013-09-12 14:55:42 -04:00
James McKaskill
9682fb2611 list out constants in declaration order 2013-09-12 14:48:11 -04:00
James McKaskill
ca1d07f657 Round trip the schema through the compiler 2013-09-12 14:37:15 -04:00
James McKaskill
82e55f6515 declare enums first 2013-09-12 14:26:22 -04:00
James McKaskill
cada8df6c2 Decode field slot when we get around to declaring it rather than early as the names aren't resolved yet 2013-09-12 14:23:40 -04:00
James McKaskill
316f470c3b Handle reserved words 2013-09-12 14:14:21 -04:00
James McKaskill
9f75d0c7a6 Update compiler to support groups/unions 2013-09-12 13:49:19 -04:00
James McKaskill
7731509861 add read/write methods for interfaces 2013-05-12 23:10:54 -04:00
James McKaskill
21e7c29a96 add interface to base lib and improve handling of empty lists 2013-05-12 22:58:48 -04:00
James McKaskill
93f695f77c add constants 2013-05-12 17:21:56 -04:00
James McKaskill
2eb6628ae4 add support for default values 2013-05-12 00:59:47 -04:00
James McKaskill
c85722874d switch back to capn_root
capn_root now returns a ptr that can be used with capn_getp/setp.
This replaces capn_new_root and capn_get_root.
2013-05-12 00:59:47 -04:00
James McKaskill
95b29a249b remove read/write_float, use to/from_f32 instead 2013-05-12 00:59:47 -04:00
James McKaskill
65c23b9218 get recursive copy to work 2013-05-12 00:59:47 -04:00
James McKaskill
2ded64d310 Add new and new list funcs 2013-05-08 23:17:21 -04:00
James McKaskill
3798d34428 rename vars in subcompiler 2013-05-08 23:15:07 -04:00
James McKaskill
e1860e2b4b bootstrap complete - use generated schema.capnp.(c|h) 2013-05-08 23:04:58 -04:00
James McKaskill
8db142a9a0 subcompiler now outputs struct defns, get, set, read, write funcs 2013-05-08 23:04:06 -04:00
James McKaskill
8bb9759e8c Move schema.* to schema.capnp.* 2013-05-08 22:57:35 -04:00
James McKaskill
923393d543 size -> len and add capn_list* back in 2013-05-08 22:38:07 -04:00
James McKaskill
c5e771dcd0 Add beginnings of subcompiler 2013-05-07 22:54:30 -04:00
James McKaskill
b8da11676a Pass capn_ptr by value, better handling of tags 2013-05-07 22:44:21 -04:00