Commit Graph
5 Commits
Author SHA1 Message Date
Petteri Aimonen 6a595279b2 New field descriptor format.
Now field information is stored as a variable-length uint32_t array.
This reduces the minimum size in most cases:

                            old            new
basic field:                10 bytes       4 bytes
repeated field:             10 bytes       8 bytes
field with 12bit tag/size:  16 bytes       8 bytes
field with 16bit tag/size:  16 bytes       16 bytes
field with 32bit tag/size:  28 bytes       16 bytes

Further, now the descriptor size can be increased per-field and per-message,
instead of previous global PB_FIELD_16BIT and PB_FIELD_32BIT.

PB_FIELD_32BIT still affects the pb_size_t type, which is 16-bit by default.
2019-01-25 18:56:34 +02:00
Petteri Aimonen 298d00e8d7 Include package name in include guard (issue #207).
Fix suggested by Ulenspiegel.

Also added testcase for the same.
2016-07-23 20:24:54 +03:00
Petteri Aimonen 0b29baf5de Make the generator understand included files (issue #165).
This will allow message sizes and enum options to be available
across the include files.

Currently searching for .options files for included files may
not work for all path combinations, this is related to issue #116.
Should probably make a pull request to protoc about that.
2015-09-12 15:47:56 +03:00
Petteri Aimonen 936cfdc675 Expand the multiple_files test case to include oneofs and enums 2015-09-12 13:27:56 +03:00
Petteri Aimonen e2e9980627 Move the rest of the tests to scons 2013-09-10 22:34:54 +03:00