Protobuf Team Bot
8c44f04697
create and lock down upb/internal/array.h
...
Internal array functions are now implemented in upb/internal/array.c and declared in
upb/internal/array.h, which only has local visibility.
PiperOrigin-RevId: 458260144
2 years ago
Protobuf Team Bot
033859ff5d
rename internal/upb.h as internal/encode.h
...
add build target for upb/internal/encode.h and lock down its visibility
PiperOrigin-RevId: 457087638
2 years ago
Protobuf Team Bot
1695cb2788
rename the upb_Array 'len' field as 'size'
...
Now that 'size' has been renamed as 'capacity' we are free to rename 'len' as
'size', so upb_Array_Size() is actually returning the 'size' field.
PiperOrigin-RevId: 456865972
2 years ago
Protobuf Team Bot
83f4988561
rename the upb_Array 'size' field as 'capacity'
...
The current field/function names for upb_Array are quite confusing.
We will fix them in two steps, this being the first step.
PiperOrigin-RevId: 456687224
2 years ago
Protobuf Team Bot
e4635f223e
match file names to type names
...
Lots of changes but it's all just moving things around.
Backward-compatible stub #include's have been provided for now.
upb_Arena/upb_Status have been split out from upb/upb.?
upb_Array/upb_Map/upb_MessageValue have been split out from upb/collections.?
upb_ExtensionRegistry has been split out from upb/msg.?
upb/decode_internal.h is now upb/internal/decode.h
upb/mini_table_accessors_internal.h is now upb/internal/mini_table_accessors.h
upb/table_internal.h is now upb/internal/table.h
upb/upb_internal.h is now upb/internal/upb.h
PiperOrigin-RevId: 456297617
2 years ago
Joshua Haberman
d72d98495d
Fixed a Python test by adding a new map insert function that distinguishes between insert and update.
...
PiperOrigin-RevId: 447214618
3 years ago
Joshua Haberman
4978040db4
Rewrote the MessageSet parsing code in the upb decoder to properly handle several edge cases.
...
PiperOrigin-RevId: 442979459
3 years ago
Joshua Haberman
76c7ca9327
Updated API for accessing extensions.
...
PiperOrigin-RevId: 442947856
3 years ago
Protobuf Team
e1e7435e70
Internal change
...
PiperOrigin-RevId: 440796832
3 years ago
Joshua Haberman
9cc02bb60d
Rewrote the MessageSet parsing code in the upb decoder to properly handle several edge cases.
...
PiperOrigin-RevId: 440788402
3 years ago
Joshua Haberman
bcb08bf9f0
Clang-format.
3 years ago
Joshua Haberman
6509f13568
Reverted extra debug assignment.
3 years ago
Joshua Haberman
1046d778a2
Removed debug print statements.
3 years ago
Joshua Haberman
7d5f4cd9b6
Implemented the functionality to make the test pass.
3 years ago
theodorerose
97273a3638
WIP
3 years ago
Joshua Haberman
532dc1f0f0
Renamed a few more constants to the new style.
...
These are not in the public API and so were not prioritized before.
No functional change here, just renames.
3 years ago
Joshua Haberman
826eca6742
Enabled ubsan tests and fixed ubsan failures.
3 years ago
Joshua Haberman
606308c639
Added back missing underscore.
3 years ago
Joshua Haberman
75b6291e40
Renamed upb_FieldType_* -> kUpb_FieldType_*
3 years ago
Joshua Haberman
72af9dc0cc
Switch to a single upb_Decode.
3 years ago
Joshua Haberman
499c2cc8b1
upb_extreg, upb_msg
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
a0374b3b08
Added required field checking into the encoder.
3 years ago
Stan Hu
81eda8fade
Fix conformance test failures on big-endian systems
...
Previously 59 tests were failing in the conformance tests. These were
failing in SINT32 and JSON enum handling. In both cases, we need to cast
int64 values to int32 to avoid losing bytes in a big-endian system.
Closes https://github.com/protocolbuffers/upb/issues/449
3 years ago
Joshua Haberman
50978256b9
Properly byte-swap fixed packed fields.
3 years ago
Stan Hu
ba83e135d2
Refactor decode_munge to call decode_munge_int32
...
This avoids an additional type check when decoding packed enums.
3 years ago
Stan Hu
ad4d4076e1
Fix big endian decoding of enum_packed
3 years ago
Stan Hu
c604ed9ae9
Fix big endian handling of enums
...
Previously using an enum for a field on big-endian process such as the
s390x would fail to decode properly. We need to munge it in the correct
byte order before decoding it.
3 years ago
Joshua Haberman
2199be91bc
Fixed UBSAN error.
3 years ago
Joshua Haberman
58968d6a78
A bit of minor code tweaking that improves benchmarks by 10%.
3 years ago
Joshua Haberman
58c1dbc11f
Addressed PR comments.
3 years ago
Joshua Haberman
1618e1b9a6
Fixed case of parsing an unknown field.
3 years ago
Joshua Haberman
f7980b7ed1
Restructured for simplicity and fixed fasttable parser.
3 years ago
Joshua Haberman
dfa28861cc
Don't store field_start, derive it separately.
3 years ago
Joshua Haberman
7c83eb93be
Removed extra size from message.
3 years ago
Joshua Haberman
3d437bbcab
Some pre-PR fixes.
3 years ago
Joshua Haberman
4abe724dde
A few more fixes.
3 years ago
Joshua Haberman
16f763e4d6
Addressed PR comments.
3 years ago
Joshua Haberman
7907ed913b
Expanded the test to cover packed fields also.
3 years ago
Joshua Haberman
8c916941b0
MSET -> MSGSET
3 years ago
Joshua Haberman
b3c91c276b
Addressed PR comments.
3 years ago
Joshua Haberman
d80e682a9c
Moved find field function closer to where it is used.
3 years ago
Joshua Haberman
53ce4354cf
Minor formatting changes.
3 years ago
Joshua Haberman
37a577c0e7
Further factored the function.
3 years ago
Joshua Haberman
69bb5d1d94
Simplified main parsing function.
3 years ago
Joshua Haberman
6f89034249
Implemented support for MessageSet.
3 years ago
Joshua Haberman
b1bbbdd4e7
Addressed PR comments.
3 years ago
Joshua Haberman
ce012b7b55
Added support for extensions.
3 years ago
Joshua Haberman
cdd6434a31
Introduced upb_extreg and plumbed it into decoder.
4 years ago
Joshua Haberman
58e158c6fa
Changed mini-table to use a custom "mode" instead of descriptor's "label."
4 years ago