|
|
@ -295,6 +295,10 @@ upb_Message_GetString(const upb_Message* msg, const upb_MiniTableField* field, |
|
|
|
return upb_Message_GetField(msg, field, def).str_val; |
|
|
|
return upb_Message_GetField(msg, field, def).str_val; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Sets the value of a `string` or `bytes` field. The bytes of the value are not
|
|
|
|
|
|
|
|
// copied, so it is the caller's responsibility to ensure that they remain valid
|
|
|
|
|
|
|
|
// for the lifetime of `msg`. That might be done by copying them into the given
|
|
|
|
|
|
|
|
// arena, or by fusing that arena with the arena the bytes live in, for example.
|
|
|
|
UPB_API_INLINE bool upb_Message_SetString(upb_Message* msg, |
|
|
|
UPB_API_INLINE bool upb_Message_SetString(upb_Message* msg, |
|
|
|
const upb_MiniTableField* field, |
|
|
|
const upb_MiniTableField* field, |
|
|
|
upb_StringView value, upb_Arena* a) { |
|
|
|
upb_StringView value, upb_Arena* a) { |
|
|
|