From e4f7b39c0627be937cb97ae78efa94e6f1bf210d Mon Sep 17 00:00:00 2001 From: Eric Salo Date: Sun, 30 Jul 2023 12:42:40 -0700 Subject: [PATCH] upb: create upb/wire/internal/ This is prep work for splitting out the :wire targets into their own BUILD PiperOrigin-RevId: 552294501 --- BUILD | 8 ++++---- upb/util/compare_test.cc | 2 +- upb/wire/decode.c | 6 +++--- upb/wire/decode_fast.c | 2 +- upb/wire/encode.c | 4 ++-- upb/wire/{common_internal.h => internal/common.h} | 6 +++--- upb/wire/{decode_internal.h => internal/decode.h} | 6 +++--- upb/wire/{swap_internal.h => internal/swap.h} | 6 +++--- upb/wire/reader.h | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) rename upb/wire/{common_internal.h => internal/common.h} (94%) rename upb/wire/{decode_internal.h => internal/decode.h} (98%) rename upb/wire/{swap_internal.h => internal/swap.h} (95%) diff --git a/BUILD b/BUILD index 0cf69bb541..e2e957eaad 100644 --- a/BUILD +++ b/BUILD @@ -874,12 +874,12 @@ cc_library( ], hdrs = [ "upb/wire/common.h", - "upb/wire/common_internal.h", "upb/wire/decode.h", "upb/wire/decode_fast.h", - "upb/wire/decode_internal.h", "upb/wire/encode.h", - "upb/wire/swap_internal.h", + "upb/wire/internal/common.h", + "upb/wire/internal/decode.h", + "upb/wire/internal/swap.h", ], copts = UPB_DEFAULT_COPTS, visibility = ["//:__subpackages__"], @@ -919,8 +919,8 @@ cc_library( cc_library( name = "wire_reader", srcs = [ + "upb/wire/internal/swap.h", "upb/wire/reader.c", - "upb/wire/swap_internal.h", ], hdrs = ["upb/wire/reader.h"], visibility = ["//visibility:public"], diff --git a/upb/util/compare_test.cc b/upb/util/compare_test.cc index 634f4737b4..92d4c11280 100644 --- a/upb/util/compare_test.cc +++ b/upb/util/compare_test.cc @@ -35,7 +35,7 @@ #include #include "gtest/gtest.h" -#include "upb/wire/swap_internal.h" +#include "upb/wire/internal/swap.h" #include "upb/wire/types.h" struct UnknownField; diff --git a/upb/wire/decode.c b/upb/wire/decode.c index a99932d20e..951dc58bc3 100644 --- a/upb/wire/decode.c +++ b/upb/wire/decode.c @@ -38,12 +38,12 @@ #include "upb/mini_table/sub.h" #include "upb/port/atomic.h" #include "upb/wire/common.h" -#include "upb/wire/common_internal.h" -#include "upb/wire/decode_internal.h" #include "upb/wire/encode.h" #include "upb/wire/eps_copy_input_stream.h" +#include "upb/wire/internal/common.h" +#include "upb/wire/internal/decode.h" +#include "upb/wire/internal/swap.h" #include "upb/wire/reader.h" -#include "upb/wire/swap_internal.h" #include "upb/wire/types.h" // Must be last. diff --git a/upb/wire/decode_fast.c b/upb/wire/decode_fast.c index 6b048a0937..2ba25adaee 100644 --- a/upb/wire/decode_fast.c +++ b/upb/wire/decode_fast.c @@ -38,7 +38,7 @@ #include "upb/wire/decode_fast.h" #include "upb/collections/array_internal.h" -#include "upb/wire/decode_internal.h" +#include "upb/wire/internal/decode.h" // Must be last. #include "upb/port/def.inc" diff --git a/upb/wire/encode.c b/upb/wire/encode.c index 702350ab90..522ef24fe2 100644 --- a/upb/wire/encode.c +++ b/upb/wire/encode.c @@ -37,8 +37,8 @@ #include "upb/message/extension_internal.h" #include "upb/mini_table/sub.h" #include "upb/wire/common.h" -#include "upb/wire/common_internal.h" -#include "upb/wire/swap_internal.h" +#include "upb/wire/internal/common.h" +#include "upb/wire/internal/swap.h" #include "upb/wire/types.h" // Must be last. diff --git a/upb/wire/common_internal.h b/upb/wire/internal/common.h similarity index 94% rename from upb/wire/common_internal.h rename to upb/wire/internal/common.h index 93e6d99b67..393a77ece1 100644 --- a/upb/wire/common_internal.h +++ b/upb/wire/internal/common.h @@ -25,8 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef UPB_WIRE_COMMON_INTERNAL_H_ -#define UPB_WIRE_COMMON_INTERNAL_H_ +#ifndef UPB_WIRE_INTERNAL_COMMON_H_ +#define UPB_WIRE_INTERNAL_COMMON_H_ // Must be last. #include "upb/port/def.inc" @@ -47,4 +47,4 @@ enum { #include "upb/port/undef.inc" -#endif /* UPB_WIRE_COMMON_INTERNAL_H_ */ +#endif /* UPB_WIRE_INTERNAL_COMMON_H_ */ diff --git a/upb/wire/decode_internal.h b/upb/wire/internal/decode.h similarity index 98% rename from upb/wire/decode_internal.h rename to upb/wire/internal/decode.h index 6867736397..0011d35619 100644 --- a/upb/wire/decode_internal.h +++ b/upb/wire/internal/decode.h @@ -30,8 +30,8 @@ * decode.c and decode_fast.c. */ -#ifndef UPB_WIRE_DECODE_INTERNAL_H_ -#define UPB_WIRE_DECODE_INTERNAL_H_ +#ifndef UPB_WIRE_INTERNAL_DECODE_H_ +#define UPB_WIRE_INTERNAL_DECODE_H_ #include "upb/mem/arena_internal.h" #include "upb/message/internal.h" @@ -160,4 +160,4 @@ UPB_INLINE uint32_t _upb_FastDecoder_LoadTag(const char* ptr) { #include "upb/port/undef.inc" -#endif /* UPB_WIRE_DECODE_INTERNAL_H_ */ +#endif /* UPB_WIRE_INTERNAL_DECODE_H_ */ diff --git a/upb/wire/swap_internal.h b/upb/wire/internal/swap.h similarity index 95% rename from upb/wire/swap_internal.h rename to upb/wire/internal/swap.h index d79d4c3c59..4a45228a64 100644 --- a/upb/wire/swap_internal.h +++ b/upb/wire/internal/swap.h @@ -25,8 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef UPB_WIRE_SWAP_INTERNAL_H_ -#define UPB_WIRE_SWAP_INTERNAL_H_ +#ifndef UPB_WIRE_INTERNAL_SWAP_H_ +#define UPB_WIRE_INTERNAL_SWAP_H_ // Must be last. #include "upb/port/def.inc" @@ -60,4 +60,4 @@ UPB_INLINE uint64_t _upb_BigEndian_Swap64(uint64_t val) { #include "upb/port/undef.inc" -#endif /* UPB_WIRE_SWAP_INTERNAL_H_ */ +#endif /* UPB_WIRE_INTERNAL_SWAP_H_ */ diff --git a/upb/wire/reader.h b/upb/wire/reader.h index b959744027..616db670ed 100644 --- a/upb/wire/reader.h +++ b/upb/wire/reader.h @@ -29,7 +29,7 @@ #define UPB_WIRE_READER_H_ #include "upb/wire/eps_copy_input_stream.h" -#include "upb/wire/swap_internal.h" +#include "upb/wire/internal/swap.h" #include "upb/wire/types.h" // Must be last.