From 960b95939be3c07923f00140e5a23fabf2aff7b7 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 20 Sep 2024 04:41:10 +0000 Subject: [PATCH] Auto-generate files after cl/676683430 --- php/ext/google/protobuf/php-upb.c | 13 +++++++++++++ php/ext/google/protobuf/php-upb.h | 13 +++++++++++++ ruby/ext/google/protobuf_c/ruby-upb.c | 13 +++++++++++++ ruby/ext/google/protobuf_c/ruby-upb.h | 13 +++++++++++++ 4 files changed, 52 insertions(+) diff --git a/php/ext/google/protobuf/php-upb.c b/php/ext/google/protobuf/php-upb.c index 0a13f477c8..4e45679a72 100644 --- a/php/ext/google/protobuf/php-upb.c +++ b/php/ext/google/protobuf/php-upb.c @@ -426,6 +426,17 @@ void __asan_unpoison_memory_region(void const volatile *addr, size_t size); #endif +// Future versions of upb will include breaking changes to some APIs. +// This macro can be set to enable these API changes ahead of time, so that +// user code can be updated before upgrading versions of protobuf. +#ifdef UPB_FUTURE_BREAKING_CHANGES + +// Properly enforce closed enums in python. +// Owner: mkruskal@ +#define UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT 1 + +#endif + #include #include @@ -17130,3 +17141,5 @@ upb_ServiceDef* _upb_ServiceDefs_New(upb_DefBuilder* ctx, int n, #undef UPB_LINKARR_APPEND #undef UPB_LINKARR_START #undef UPB_LINKARR_STOP +#undef UPB_FUTURE_BREAKING_CHANGES +#undef UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT diff --git a/php/ext/google/protobuf/php-upb.h b/php/ext/google/protobuf/php-upb.h index 09e545d13a..a6ce24b99f 100644 --- a/php/ext/google/protobuf/php-upb.h +++ b/php/ext/google/protobuf/php-upb.h @@ -425,6 +425,17 @@ void __asan_unpoison_memory_region(void const volatile *addr, size_t size); #endif +// Future versions of upb will include breaking changes to some APIs. +// This macro can be set to enable these API changes ahead of time, so that +// user code can be updated before upgrading versions of protobuf. +#ifdef UPB_FUTURE_BREAKING_CHANGES + +// Properly enforce closed enums in python. +// Owner: mkruskal@ +#define UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT 1 + +#endif + #ifndef UPB_BASE_STATUS_H_ #define UPB_BASE_STATUS_H_ @@ -15346,3 +15357,5 @@ upb_MethodDef* _upb_MethodDefs_New(upb_DefBuilder* ctx, int n, #undef UPB_LINKARR_APPEND #undef UPB_LINKARR_START #undef UPB_LINKARR_STOP +#undef UPB_FUTURE_BREAKING_CHANGES +#undef UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT diff --git a/ruby/ext/google/protobuf_c/ruby-upb.c b/ruby/ext/google/protobuf_c/ruby-upb.c index c3e07eca40..1d5f13a913 100644 --- a/ruby/ext/google/protobuf_c/ruby-upb.c +++ b/ruby/ext/google/protobuf_c/ruby-upb.c @@ -426,6 +426,17 @@ void __asan_unpoison_memory_region(void const volatile *addr, size_t size); #endif +// Future versions of upb will include breaking changes to some APIs. +// This macro can be set to enable these API changes ahead of time, so that +// user code can be updated before upgrading versions of protobuf. +#ifdef UPB_FUTURE_BREAKING_CHANGES + +// Properly enforce closed enums in python. +// Owner: mkruskal@ +#define UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT 1 + +#endif + #include #include @@ -16618,3 +16629,5 @@ upb_ServiceDef* _upb_ServiceDefs_New(upb_DefBuilder* ctx, int n, #undef UPB_LINKARR_APPEND #undef UPB_LINKARR_START #undef UPB_LINKARR_STOP +#undef UPB_FUTURE_BREAKING_CHANGES +#undef UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT diff --git a/ruby/ext/google/protobuf_c/ruby-upb.h b/ruby/ext/google/protobuf_c/ruby-upb.h index b7bd8797e6..9b39bb64b7 100755 --- a/ruby/ext/google/protobuf_c/ruby-upb.h +++ b/ruby/ext/google/protobuf_c/ruby-upb.h @@ -427,6 +427,17 @@ void __asan_unpoison_memory_region(void const volatile *addr, size_t size); #endif +// Future versions of upb will include breaking changes to some APIs. +// This macro can be set to enable these API changes ahead of time, so that +// user code can be updated before upgrading versions of protobuf. +#ifdef UPB_FUTURE_BREAKING_CHANGES + +// Properly enforce closed enums in python. +// Owner: mkruskal@ +#define UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT 1 + +#endif + #ifndef UPB_BASE_STATUS_H_ #define UPB_BASE_STATUS_H_ @@ -15159,3 +15170,5 @@ upb_MethodDef* _upb_MethodDefs_New(upb_DefBuilder* ctx, int n, #undef UPB_LINKARR_APPEND #undef UPB_LINKARR_START #undef UPB_LINKARR_STOP +#undef UPB_FUTURE_BREAKING_CHANGES +#undef UPB_FUTURE_PYTHON_CLOSED_ENUM_ENFORCEMENT