normalize upb_Message_New()
We had _upb_Message_New(), which created a message from a mini table and was
being used outside of upb even though it is an internal-only function.
We also had upb_Message_New(), which created a message from a message def.
Now there is a single public function, upb_Message_New(), which creates a
message from a mini table and covers all use cases. (The internal version has the same definition and is used for inlining.)
PiperOrigin-RevId: 480169804
diff --git a/python/map.c b/python/map.c
index dfadf41..bdfb34d 100644
--- a/python/map.c
+++ b/python/map.c
@@ -204,7 +204,9 @@
map = PyUpb_MapContainer_EnsureReified(_self);
upb_Arena* arena = PyUpb_Arena_Get(self->arena);
if (upb_FieldDef_IsSubMessage(val_f)) {
- u_val.msg_val = upb_Message_New(upb_FieldDef_MessageSubDef(val_f), arena);
+ const upb_Message* m = upb_FieldDef_MessageSubDef(val_f);
+ const upb_MiniTable* layout = upb_MessageDef_MiniTable(m);
+ u_val.msg_val = upb_Message_New(layout, arena);
} else {
memset(&u_val, 0, sizeof(u_val));
}