Some uses put the `inline` keyword before the attribute, some put it after the
attribute, some didn't put it at all.
Clang is very permissive and it allowed code to work where it breaks in other
compilers. GCC doesn't like if you don't put the keyword, MSVC doesn't like if
the keyword is in the wrong place.
By moving the keyword into the macro we prevent this issue altogether.
PiperOrigin-RevId: 693469310
This CL deletes the per-message C++ functions for operating on repeated fields
and replaces them with functions in the runtime that can work with arbitrary
messages.
Similar to what we did with maps, this required refactoring the code to make it
work with `RepeatedPtrFieldBase`, the untyped base class of
`RepeatedPtrField<T>`. I added a `RustRepeatedMessageHelper` class to allow us
access to the protected methods we need.
This should save a bit of linker input code size, but I think more importantly
we are going to need this eventually to enable tree shaking to work well.
PiperOrigin-RevId: 693394959
EnableIfHpbClass was too restrictive in the past; it was
toggled only if <T> was extended. This has been rectified
to toggle if T extends T::Access, which reflects the
true intention.
PiperOrigin-RevId: 693368653
I noticed that the use of `unsafe` here was not really necessary, so I tweaked
the code to remove it. If we avoid using `__unstable_leak_raw_message()` then
we don't need to unsafely create a `NonNull`.
PiperOrigin-RevId: 693357956
Protobuf 6.30.0 will change the return types of Descriptor::name() and other methods to absl::string_view. This makes the code work both before and after such a change.
PiperOrigin-RevId: 693050410
Allocate extension number 536000000 to Buf
Extension numbers will be allocated one at a time by request.
Once extension declarations are open-sourced for extensions in descriptor.proto, we will move these declarations into a separate config file to declutter descriptor.proto.
PiperOrigin-RevId: 692315472
These were already being grouped because we group by branch name for scheduled workflow runs. By not canceling in-progress runs, a single stalled execution could block our CI indefinitely.
PiperOrigin-RevId: 692298661