Eric Salo
87f9b868b8
update some more functions to match the accessor naming convention
...
upb_MiniTable_SetEnumProto2() -> upb_Message_SetEnumProto2()
upb_MiniTable_GetMessage() -> upb_Message_GetMessage()
upb_MiniTable_SetMessage() -> upb_Message_SetMessage()
upb_MiniTable_GetMutableMessage() -> upb_Message_GetOrCreateMutableMessage()
PiperOrigin-RevId: 500781434
2 years ago
Protobuf Team Bot
b8f35b2628
Fix missing parameter lists.
...
In C (before C23), a missing parameter list means “parameters are unknown”, not
“no parameters” (unlike C++). See
https://en.cppreference.com/w/c/language/function_declaration .
PiperOrigin-RevId: 499559101
2 years ago
Protobuf Team Bot
c64f26e4fa
Add missing “static”
...
PiperOrigin-RevId: 499545735
2 years ago
Eric Salo
c628e53dde
upb_MiniTable_GetMutableMap() -> upb_Message_GetOrCreateMutableMap()
...
PiperOrigin-RevId: 499371815
2 years ago
Joshua Haberman
7cd8f6c940
Ported more cases of wire format parsing to upb_WireReader.
...
PiperOrigin-RevId: 498502557
2 years ago
Joshua Haberman
112f037da6
Migrated the text format encoder to upb_WireReader.
...
Also fixed a few bugs and added new functionality to upb_WireReader.
PiperOrigin-RevId: 498223970
2 years ago
Joshua Haberman
75488a0742
Created a new upb_WireReader interface for parsing wire data directly.
...
The overall motivation for this interface is to consolidate many places in upb that are parsing wire format data directly.
This interface is not yet complete, but this is a good start. We have enough to port the wire format parsing in accessors.c to this interface. We can follow up by porting more places that do wire format parsing.
PiperOrigin-RevId: 498109788
2 years ago
Joshua Haberman
003ecb3125
Rolling forward: expanded GCC diagnostic pragmas to cover all of accessors.h.
...
PiperOrigin-RevId: 497983863
2 years ago
Protobuf Team Bot
565b28c0d1
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: 497871886
2 years ago
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
2 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