From ca08ff5b74b7dfc3e1ac8375fb22e08e7f4d61b0 Mon Sep 17 00:00:00 2001 From: Protobuf Team Bot Date: Fri, 24 Jun 2022 16:32:40 -0700 Subject: [PATCH] lock down upb/internal/decode.h PiperOrigin-RevId: 457116753 --- BUILD | 28 ++++++++++++++++++++++++---- upb/internal/decode.h | 4 +--- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/BUILD b/BUILD index f396377bfa..1dd45e632f 100644 --- a/BUILD +++ b/BUILD @@ -106,7 +106,6 @@ cc_library( "upb/arena.c", "upb/decode.c", "upb/encode.c", - "upb/internal/decode.h", "upb/internal/table.h", "upb/msg.c", "upb/msg_internal.h", @@ -129,12 +128,12 @@ cc_library( visibility = ["//visibility:public"], deps = [ ":arena_internal", + ":decode_internal", ":encode_internal", ":extension_registry", ":fastdecode", ":port", ":table_internal", - "//third_party/utf8_range", ], ) @@ -271,17 +270,16 @@ cc_library( "upb/decode.h", "upb/decode_fast.c", "upb/decode_fast.h", - "upb/internal/decode.h", "upb/msg.h", "upb/msg_internal.h", ], copts = UPB_DEFAULT_COPTS, deps = [ ":arena_internal", + ":decode_internal", ":extension_registry", ":port", ":table_internal", - "//third_party/utf8_range", ], ) @@ -720,6 +718,25 @@ cc_library( deps = [":port"], ) +cc_library( + name = "decode_internal", + srcs = [ + "upb/decode.h", + "upb/extension_registry.h", + "upb/msg.h", + "upb/msg_internal.h", + ], + hdrs = ["upb/internal/decode.h"], + copts = UPB_DEFAULT_COPTS, + visibility = ["//:__subpackages__"], + deps = [ + ":arena_internal", + ":port", + ":table_internal", + "//third_party/utf8_range", + ], +) + cc_library( name = "encode_internal", hdrs = ["upb/internal/encode.h"], @@ -759,6 +776,7 @@ upb_amalgamation( libs = [ ":arena_internal", ":collections", + ":decode_internal", ":descriptor_upb_proto", ":encode_internal", ":extension_registry", @@ -787,6 +805,7 @@ upb_amalgamation( libs = [ ":arena_internal", ":collections", + ":decode_internal", ":descriptor_upb_proto", ":descriptor_upb_proto_reflection", ":encode_internal", @@ -818,6 +837,7 @@ upb_amalgamation( libs = [ ":arena_internal", ":collections", + ":decode_internal", ":descriptor_upb_proto", ":encode_internal", ":extension_registry", diff --git a/upb/internal/decode.h b/upb/internal/decode.h index d1bc30a4c2..af244dbd19 100644 --- a/upb/internal/decode.h +++ b/upb/internal/decode.h @@ -33,14 +33,12 @@ #ifndef UPB_INTERNAL_DECODE_H_ #define UPB_INTERNAL_DECODE_H_ -#include - #include "upb/decode.h" #include "upb/internal/arena.h" #include "upb/msg_internal.h" #include "third_party/utf8_range/utf8_range.h" -/* Must be last. */ +// Must be last. #include "upb/port_def.inc" #define DECODE_NOGROUP (uint32_t) - 1