Joshua Haberman
fa8b605f78
Implemented MiniDescriptors for proto2 enums.
...
An enum MiniDescriptor simply encodes a set of valid `int32_t` values, so that the protobuf parser can test whether a given enum value is known or not.
The format implemented here is novel and needs to be documented. In short, the format is:
1. base92 values 0-31: 5-bit mask indicating presence or absence of the next five enum values.
2. base92 values 60-91: varint indicating skip over a region of enum values.
Negative enum values are encoded as their `uint32_t` equivalent.
PiperOrigin-RevId: 442892799
3 years ago
Joshua Haberman
7c4d12e856
Addressed PR comments.
3 years ago
Joshua Haberman
8405436044
Addressed PR comments.
3 years ago
Joshua Haberman
de2c129362
First draft of mini-table building API.
3 years ago
Joshua Haberman
1c955f37ce
Mass API rename and clang-reformat ( #485 )
...
* Wave 1: upb_fielddef.
* upb_fielddef itself.
* upb_oneofdef.
* upb_msgdef.
* ExtensionRange.
* upb_enumdef
* upb_enumvaldef
* upb_filedef
* upb_methoddef
* upb_servicedef
* upb_symtab
* upb_defpool_init
* upb_wellknown and upb_syntax_t
* Some constants.
* upb_status
* upb_strview
* upb_arena
* upb.h constants
* reflection
* encode
* JSON decode.
* json encode.
* msg_internal.
* Formatted with clang-format.
* Some naming fixups and comment reformatting.
* More refinements.
* A few more stragglers.
* Fixed PyObject_HEAD with semicolon. Removed TODO entries.
3 years ago
Joshua Haberman
cd9915abe2
Removed obsolete function and added coments for existing functions.
3 years ago
Joshua Haberman
b0f81596be
All tests passing!
3 years ago
Joshua Haberman
bfc264d098
Moved pointers left and added some comments.
3 years ago
Joshua Haberman
deddc20f0c
Adds implementations for most descriptor objects.
3 years ago
Joshua Haberman
eec1a45e02
Formatted files with clang-format.
3 years ago
Joshua Haberman
94ece04552
Initial commit of Python+upb.
3 years ago
Joshua Haberman
823eb09694
Update all 2011 dates to 2021.
4 years ago
Joshua Haberman
e59d2c8fa7
Added license headers to all files.
4 years ago
Joshua Haberman
0dc2394da5
Changes to support import into google3 ( #291 )
...
* Fixes for google3.
* Added to failure list for new failure.
* Reused existing failure list file.
* Add a ./ to assist rewriting.
5 years ago
Joshua Haberman
d49c1db6c2
New JSON decoder, string->msg using reflection.
...
This compiles successfully, but I have not executed
it even once.
5 years ago