1 // Protocol Buffers - Google's data interchange format 2 // Copyright 2023 Google LLC. All rights reserved. 3 // 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file or at 6 // https://developers.google.com/open-source/licenses/bsd 7 8 #ifndef UPB_MESSAGE_COMPARE_H_ 9 #define UPB_MESSAGE_COMPARE_H_ 10 11 #include "upb/message/message.h" 12 #include "upb/mini_table/message.h" 13 14 // Must be last. 15 #include "upb/port/def.inc" 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 // Compares two messages by serializing them and calling memcmp(). 22 UPB_API bool upb_Message_IsExactlyEqual(const upb_Message* msg1, 23 const upb_Message* msg2, 24 const upb_MiniTable* m); 25 26 #ifdef __cplusplus 27 } /* extern "C" */ 28 #endif 29 30 #include "upb/port/undef.inc" 31 32 #endif // UPB_MESSAGE_COMPARE_H_ 33