[ObjC] Update oneof clearing internals.
- Add/document an public api for clearing oneofs.
- Move the current library internals to a new api and keep a shim for old
generated code.
diff --git a/objectivec/GPBUtilities.h b/objectivec/GPBUtilities.h
index ef4f855..828fd16 100644
--- a/objectivec/GPBUtilities.h
+++ b/objectivec/GPBUtilities.h
@@ -34,6 +34,8 @@
#import "GPBMessage.h"
#import "GPBRuntimeTypes.h"
+@class GPBOneofDescriptor;
+
CF_EXTERN_C_BEGIN
NS_ASSUME_NONNULL_BEGIN
@@ -92,6 +94,14 @@
**/
void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field);
+/**
+ * Clears the given onoof field for the given message.
+ *
+ * @param self The message for which to clear the field.
+ * @param oneof The oneof to clear.
+ **/
+void GPBClearOneof(GPBMessage *self, GPBOneofDescriptor *oneof);
+
//%PDDM-EXPAND GPB_ACCESSORS()
// This block of code is generated, do not edit it directly.
// clang-format off