Protobuf Team Bot
eafacfad50
Introduce upb_Message_SetBaseFieldMessage()
...
This just behaves the same as the pre-existing upb_Message_SetMessage(), but with the intendended naming style (upb_Message_SetMessage should accept an arena and support extensions).
PiperOrigin-RevId: 667998428
3 months ago
Joshua Haberman
0309d86d31
Fixed `NAN`/`INFINITY` definitions to work on Windows 11 SDK.
...
Fixes: https://github.com/protocolbuffers/protobuf/issues/17308 , https://github.com/protocolbuffers/protobuf/issues/17238
Confirmation that this addresses the issue: https://github.com/grpc/grpc/issues/37210#issuecomment-2226809722
PiperOrigin-RevId: 652541857
5 months ago
Protobuf Team Bot
f9dd9ce66e
UPB text encoder without using reflection for Rust (used for a message's Debug trait) that will print out field number to value entries instead of field name to value entries of a message like how it's expected for the usual text format using reflection.
...
General test for it is done in Rust, and then extensions are tested in UPB as they're not currently supported in Rust-upb.
PiperOrigin-RevId: 651113583
5 months ago
Derek Benson
e2ab51b799
Add upb_Message_MergeFrom to upb
...
PiperOrigin-RevId: 646470242
5 months ago
Hong Shin
0730adb1c1
rename upb_Message_WhichOneof to upb_Message_WhichOneofByDef
...
and introduce upb_Message_WhichOneof that returns a minitable field without needing reflection
PiperOrigin-RevId: 637932147
6 months ago
Protobuf Team Bot
5fb5b871dc
Remove spurious 'return' in a void function of another void.
...
PiperOrigin-RevId: 635530952
7 months ago
Eric Salo
f93565c20c
upb: publish and start using the new non-universal setters out in the wild
...
PiperOrigin-RevId: 632663127
7 months ago
Eric Salo
6245733655
upb: remove the unused (upb_MiniTable*) arg from upb_Message_SetMessage()
...
PiperOrigin-RevId: 632267379
7 months ago
Eric Salo
d923896299
upb: implement most of the non-universal setters
...
PiperOrigin-RevId: 631620526
7 months ago
Eric Salo
65821a67d6
upb: finish cleaning up message/accessors.h and message/internal/accessors.h
...
PiperOrigin-RevId: 631612923
7 months ago
Hong Shin
6ccda4d2b5
Add upb_Message_ClearOneof (and retain upb_Message_WhichOneofFieldNumber)
...
upb users currently need to manually fetch a oneof field in order to clear it.
In this CL, we add a convenience method to do that in one fell swoop.
PiperOrigin-RevId: 631454136
7 months ago
Eric Salo
18306666b9
upb: clean up the UPB_TRACING_ENABLED code
...
PiperOrigin-RevId: 631023575
7 months ago
Eric Salo
aa70a3576b
upb: clean up message/accessors.h and message/internal/accessors.h
...
PiperOrigin-RevId: 630466865
7 months ago
Éamonn McManus
b4f4f8ef65
Automated rollback of commit 7a09c4569b
.
...
PiperOrigin-RevId: 629808114
7 months ago
Hong Shin
7a09c4569b
Add upb_Message_ClearOneof
...
upb users currently need to manually fetch a oneof field in order to clear it.
In this CL, we add a convenience method to do that in one fell swoop.
PiperOrigin-RevId: 629782904
7 months ago
Protobuf Team Bot
12a828c700
Add UPB_ASSUME(!IsExtension) on GetMutableMessage.
...
This function is UB to call on an extension field.
PiperOrigin-RevId: 629701038
7 months ago
Hong Shin
e0fc566596
Ensure the appropriate upb functions taking non-const pointers assert that the message is not frozen.
...
Fixes message/promote.c and internal/extension.c.
PiperOrigin-RevId: 628095780
7 months ago
Hong Shin
5b5db6666e
Check IsFrozen for internal/message.c and reflection/message.c
...
PiperOrigin-RevId: 627531912
7 months ago
Hong Shin
bceb7f597f
Check IsFrozen for message/copy.c, experimental_jspb/decode.c, and json/decode.c
...
PiperOrigin-RevId: 627468915
7 months ago
Joshua Haberman
37e484a0aa
Replace direct access to MiniTable subs with calls to the encapsulated functions.
...
PiperOrigin-RevId: 626485595
8 months ago
Eric Salo
9118be944d
upb: extension/basefield setters are now public functions
...
PiperOrigin-RevId: 623355801
8 months ago
Eric Salo
52aa23f3fc
upb: reuse upb_Message_Internal buffer after a upb_Message_Clear()
...
PiperOrigin-RevId: 622913413
8 months ago
Eric Salo
3d21bc26c9
upb: define kUpb_CompareOption_IncludeUnknownFields flag for upb_Message_IsEqual()
...
PiperOrigin-RevId: 622335300
8 months ago
Protobuf Team Bot
d5a435fb4b
Rename 'length delimited' to 'length prefixed'
...
PiperOrigin-RevId: 621597812
8 months ago
Protobuf Team Bot
c6f6a3291e
Add Length-Delimited Encode and Decode functions to upb.
...
PiperOrigin-RevId: 621510731
8 months ago
Protobuf Team Bot
d7f032ad15
Move private definitions out of //bazel
...
This is needed to make protobuf/bazel package minimal for other proto rules.
Keep 4 public bzl files in upb/bazel. They end up under protobuf/bazel, and they are legitimately used by other repositories.
Move upb_proto_library_internal/* under bazel/private. Those are utilities used in the rules. Moving them one level deeper makes protobuf/bazel package clean for other rules.
Move build_defs.bzl and amalgamation under /upb/bazel. Those are utilities used in the build.
Move lua.BUILD and python* uner /python/dist. Those are used in the WORKSPACE dependency setup.
PiperOrigin-RevId: 621442236
8 months ago
Eric Salo
d51df2d2d7
upb: make upb_Array_Reserve() a public function
...
PiperOrigin-RevId: 620303837
8 months ago
Protobuf Team Bot
2f0fe0641c
Add Arena tracing handlers.
...
PiperOrigin-RevId: 615779322
9 months ago
Eric Salo
a03ece58f7
upb: delete upb_Map_Delete2()
...
PiperOrigin-RevId: 615169203
9 months ago
Mike Kruskal
b6032d72e3
Add basic upb cmake support.
...
libupb will always be statically linked, and currently doesn't ever install itself.
PiperOrigin-RevId: 615136389
9 months ago
Eric Salo
e1a19ba8bb
upb: add 'options' arg to upb_Message_IsEqual()
...
PiperOrigin-RevId: 614707625
9 months ago
Éamonn McManus
3c0f3ca6be
Document `upb_Message_SetMessage`.
...
PiperOrigin-RevId: 613747349
9 months ago
Protobuf Team Bot
cbfb6991f3
Add api to trace message allocations.
...
Initialize minitable tracing field for MtDecoder
Add api for non C language runtimes to initialize dynamic mini table name.
PiperOrigin-RevId: 613664457
9 months ago
Eric Salo
3d7e75fb98
upb: remove split64 from Dart VM, delete array_split64.h from upb/message/
...
PiperOrigin-RevId: 613285612
9 months ago
Éamonn McManus
6cbcff4bb6
Clarify that `upb_Message_SetString` does not copy data.
...
PiperOrigin-RevId: 613258771
9 months ago
Protobuf Team Bot
e8244da7c6
Adds mutable extension accessors to the codegen for upb C for getting mutable extension messages.
...
PiperOrigin-RevId: 613017999
9 months ago
Éamonn McManus
507f037f7e
Document the return value of `upb_Message_SetField`.
...
PiperOrigin-RevId: 612961189
9 months ago
Eric Salo
a5d9b0522c
upb: delete upb_Message_IsExactlyEqual()
...
PiperOrigin-RevId: 606282881
10 months ago
Eric Salo
c69ed472cd
upb: implement minitable-based field iterators
...
PiperOrigin-RevId: 605718863
10 months ago
Eric Salo
b0d3a787cc
upb: Simplify inline functions in mini_table/ and mem/ and wire/ and message/
...
PiperOrigin-RevId: 605413999
10 months ago
Eric Salo
bc75a9be30
upb: remove the default arg from upb_Message_GetMessage()
...
PiperOrigin-RevId: 603225526
10 months ago
Eric Salo
f212cc23d7
upb: use upb_MessageValue in upb_Extension
...
PiperOrigin-RevId: 602785269
10 months ago
Eric Salo
7303758dd2
upb: factor out Java code for reading upb_Array data
...
PiperOrigin-RevId: 602461889
10 months ago
Eric Salo
98843d15ac
upb: attempt to reduce the direct use of UPB_PRIVATE() fields
...
PiperOrigin-RevId: 602270576
10 months ago
Eric Salo
7b6a845ab7
upb: implement immutability
...
PiperOrigin-RevId: 601848001
10 months ago
Eric Salo
5bded04d28
upb: add 'static' to UPB_FORCEINLINE()
...
PiperOrigin-RevId: 601525709
10 months ago
Eric Salo
953d521a04
upb: upb_Message_FindExtensionByNumber() no longer returns a (upb_Extension*)
...
PiperOrigin-RevId: 601494260
10 months ago
Joshua Haberman
ca5ca62fa6
Fixed a bug when deep copying a map field with a closed enum value.
...
PiperOrigin-RevId: 601195914
10 months ago
Eric Salo
9d625a1df7
upb: fix the map encoder to stop dying under ubsan
...
PiperOrigin-RevId: 601004095
10 months ago
Eric Salo
ed5eb924d7
upb: upb_Message_ExtensionByIndex() no longer returns a (upb_Extension*)
...
PiperOrigin-RevId: 600926618
10 months ago