Joshua Haberman
48ad4bbd0f
Unified accessor API for repeated field getters and setters.
...
This CL eliminates the last remaining callers of GetFieldOffset(), therefore opening the door to a more principled bootstrapping process.
PiperOrigin-RevId: 497864910
2 years ago
Eric Salo
4f8734694c
rename the array accessors to match the other accessors
...
upb_MiniTable_GetArray() -> upb_Message_GetArray()
upb_MiniTable_GetMutableArray() -> upb_Message_GetMutableArray()
upb_MiniTable_ResizeArray() -> upb_Message_ResizeArray()
PiperOrigin-RevId: 495809284
2 years ago
Protobuf Team Bot
9e9d43b462
Add support for promoting unlinked map fields from unknown to upb_Map.
...
PiperOrigin-RevId: 494820200
2 years ago
Protobuf Team Bot
e231dc955b
Fix Upb Unknown to repeated message promotion when initial message has null upb_Array.
...
PiperOrigin-RevId: 494044387
2 years ago
Joshua Haberman
2272970a94
Unified ClearField
...
PiperOrigin-RevId: 490623243
2 years ago
Joshua Haberman
e567b7c206
Fixed a bug in GetOrPromoteExtension
...
Adding an extension can invalidate pointers previously returned from
upb_Message_FindUnknown().
PiperOrigin-RevId: 490565219
2 years ago
Eric Salo
ff6439fba0
move the wire type definitions into upb/wire/ where they belong
...
PiperOrigin-RevId: 489500430
2 years ago
Eric Salo
27d70edfe2
clean up the :mini_table build target
...
Remove circular dependencies that were bouncing back and forth between
msg_internal.h and mini_table/, including:
- splitting out each mini table subtype into its own header
- moving the non-reflection message code into message/
- moving the accessors from mini_table/ to message/
PiperOrigin-RevId: 489121042
2 years ago
Eric Salo
0e76047f5f
add defaults to the mini table scalar getter accessor functions
...
also inline upb_MiniTable_HasField()
PiperOrigin-RevId: 487588457
2 years ago
Eric Salo
75907f7af9
rename the upb_MiniTable subtypes to follow the upb style guide:
...
upb_MiniTable_Enum -> upb_MiniTableEnum
upb_MiniTable_Extension -> upb_MiniTableExtension
upb_MiniTable_Field -> upb_MiniTableField
upb_MiniTable_File -> upb_MiniTableFile
upb_MiniTable_Sub -> upb_MiniTableSub
PiperOrigin-RevId: 486712960
2 years ago
Eric Salo
f6307877d3
move portability stuff into upb/port/
...
Also delete redundant system #includes that are already pulled in by port/def.inc
PiperOrigin-RevId: 486398989
2 years ago
Protobuf Team Bot
f345caf115
Update diagnostics for GCC warning
...
PiperOrigin-RevId: 486274318
2 years ago
Eric Salo
fd14316f38
create collections/ subdir for all array and map code
...
PiperOrigin-RevId: 486013554
2 years ago
Eric Salo
e137175092
create wire/ subdir for all wire-format code
...
PiperOrigin-RevId: 485898080
2 years ago
Eric Salo
c033eff26f
split apart mini_table.c into a new subdir
...
PiperOrigin-RevId: 484352293
2 years ago
Protobuf Team Bot
aabb2b62ae
Add upb_Message_DeleteUnknown API.
...
Add test proto.
PiperOrigin-RevId: 479178356
2 years ago
Protobuf Team Bot
e76dc4ac8a
Fix mini_table_accessors FindUnknown status.
...
PiperOrigin-RevId: 476391579
2 years ago
Eric Salo
00765002ff
- All of reflection now lives in upb/reflection/
...
- Each def type has its own .c file and its own .h file
- Functions that require a builder context are declared in def_builder.h
- The mini descriptor encoders have also been pulled into upb/reflection/
- upb/def.h, upb/def.hpp, upb/reflection.h, and upb/reflection.hpp are now deprecated stubs that point to the new headers
PiperOrigin-RevId: 474459500
2 years ago
Protobuf Team Bot
e09d6fcb6d
Update mini table API comment
...
PiperOrigin-RevId: 463868386
2 years ago
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
7975945e61
clean up the dependency graph some more
...
PiperOrigin-RevId: 456890270
2 years ago
Protobuf Team Bot
65bde4e75b
upb_Encode() now returns a status value
...
PiperOrigin-RevId: 454740100
3 years ago
Protobuf Team
b28d80a9cc
Fix GetMutableMessage not updating presence and storing new instance.
...
Add array resize API to support GetMutableRepeatedField api with size argument.
PiperOrigin-RevId: 452075516
3 years ago
Protobuf Team
459059e301
Add Extensions to mini table based reflection apis.
...
PiperOrigin-RevId: 447561140
3 years ago
Protobuf Team
c7620a4690
Mini table accessors Part2 (repeated fields).
...
Introduces upb_FieldValue for array accessor api.
PiperOrigin-RevId: 445491436
3 years ago
Protobuf Team
e5468b47f8
Add mini table accessors
...
- Add hazzer, ClearField
- Add bool/int32 accessors
PiperOrigin-RevId: 442906872
3 years ago