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
Eric Salo
f9af78e7ee
upb: upb_MiniTable_GetOrPromoteExtension() no longer returns a (upb_Extension*)
...
PiperOrigin-RevId: 600662130
10 months ago
Eric Salo
07f784a2f3
upb: tag _upb_Message_GetOrCreateExtension() as UPB_PRIVATE()
...
PiperOrigin-RevId: 600653849
10 months ago
Eric Salo
373ffa6622
upb: tag _upb_Message_Getext() as UPB_PRIVATE()
...
PiperOrigin-RevId: 600639423
10 months ago
Eric Salo
7c5ff29979
upb: add upb_MiniTableExtension_CType()
...
PiperOrigin-RevId: 599313198
11 months ago