remove upb_MtDataEncoder from the public surface

PiperOrigin-RevId: 485928803
pull/13171/head
Eric Salo 2 years ago committed by Copybara-Service
parent 0bb466356d
commit d9b6f13cde
  1. 5
      BUILD
  2. 1
      upb/mini_table.h
  3. 2
      upb/mini_table/accessors_test.cc
  4. 3
      upb/mini_table/encode.c
  5. 6
      upb/mini_table/encode_internal.h
  6. 9
      upb/mini_table/encode_internal.hpp
  7. 2
      upb/mini_table/encode_test.cc
  8. 2
      upb/reflection/desc_state_internal.h
  9. 1
      upb/reflection/enum_def.c
  10. 1
      upb/reflection/field_def.c
  11. 2
      upbc/BUILD
  12. 2
      upbc/file_layout.cc
  13. 3
      upbc/file_layout.h
  14. 2
      upbc/protoc-gen-upb.cc

@ -181,6 +181,8 @@ cc_library(
], ],
hdrs = [ hdrs = [
"upb/mini_table/common_internal.h", "upb/mini_table/common_internal.h",
"upb/mini_table/encode_internal.h",
"upb/mini_table/encode_internal.hpp",
], ],
visibility = ["//:__subpackages__"], visibility = ["//:__subpackages__"],
deps = [ deps = [
@ -199,13 +201,12 @@ cc_library(
"upb/mini_table/common_internal.h", "upb/mini_table/common_internal.h",
"upb/mini_table/decode.c", "upb/mini_table/decode.c",
"upb/mini_table/encode.c", "upb/mini_table/encode.c",
"upb/mini_table/encode_internal.h",
"upb/msg_internal.h", "upb/msg_internal.h",
], ],
hdrs = [ hdrs = [
"upb/mini_table.h", "upb/mini_table.h",
"upb/mini_table.hpp",
"upb/mini_table/decode.h", "upb/mini_table/decode.h",
"upb/mini_table/encode.h",
], ],
copts = UPB_DEFAULT_COPTS, copts = UPB_DEFAULT_COPTS,
visibility = ["//visibility:public"], visibility = ["//visibility:public"],

@ -31,6 +31,5 @@
#define UPB_MINI_TABLE_H_ #define UPB_MINI_TABLE_H_
#include "upb/mini_table/decode.h" #include "upb/mini_table/decode.h"
#include "upb/mini_table/encode.h"
#endif /* UPB_MINI_TABLE_H_ */ #endif /* UPB_MINI_TABLE_H_ */

@ -38,7 +38,7 @@
#include "google/protobuf/test_messages_proto3.upb.h" #include "google/protobuf/test_messages_proto3.upb.h"
#include "upb/array.h" #include "upb/array.h"
#include "upb/mini_table/decode.h" #include "upb/mini_table/decode.h"
#include "upb/mini_table/encode.h" #include "upb/mini_table/encode_internal.h"
#include "upb/test.upb.h" #include "upb/test.upb.h"
#include "upb/upb.h" #include "upb/upb.h"
#include "upb/wire/decode.h" #include "upb/wire/decode.h"

@ -25,13 +25,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "upb/mini_table/encode.h"
#include <inttypes.h> #include <inttypes.h>
#include "upb/mem/arena.h" #include "upb/mem/arena.h"
#include "upb/mini_table/common.h" #include "upb/mini_table/common.h"
#include "upb/mini_table/common_internal.h" #include "upb/mini_table/common_internal.h"
#include "upb/mini_table/encode_internal.h"
#include "upb/upb.h" #include "upb/upb.h"
// Must be last. // Must be last.

@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef UPB_MINI_TABLE_ENCODE_H_ #ifndef UPB_MINI_TABLE_ENCODE_INTERNAL_H_
#define UPB_MINI_TABLE_ENCODE_H_ #define UPB_MINI_TABLE_ENCODE_INTERNAL_H_
#include "upb/mini_table/common.h" #include "upb/mini_table/common.h"
@ -106,4 +106,4 @@ char* upb_MtDataEncoder_EncodeMessageSet(upb_MtDataEncoder* e, char* ptr);
#include "upb/port_undef.inc" #include "upb/port_undef.inc"
#endif /* UPB_MINI_TABLE_ENCODE_H_ */ #endif /* UPB_MINI_TABLE_ENCODE_INTERNAL_H_ */

@ -25,13 +25,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef UPB_MINI_TABLE_HPP_ #ifndef UPB_MINI_TABLE_ENCODE_INTERNAL_HPP_
#define UPB_MINI_TABLE_HPP_ #define UPB_MINI_TABLE_ENCODE_INTERNAL_HPP_
#include <string> #include <string>
#include "upb/mini_table/decode.h" #include "upb/mini_table/encode_internal.h"
#include "upb/mini_table/encode.h"
namespace upb { namespace upb {
@ -133,4 +132,4 @@ class MtDataEncoder {
} // namespace upb } // namespace upb
#endif /* UPB_MINI_TABLE_HPP_ */ #endif /* UPB_MINI_TABLE_ENCODE_INTERNAL_HPP_ */

@ -29,9 +29,9 @@
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "absl/container/flat_hash_set.h" #include "absl/container/flat_hash_set.h"
#include "upb/mini_table.hpp"
#include "upb/mini_table/common_internal.h" #include "upb/mini_table/common_internal.h"
#include "upb/mini_table/decode.h" #include "upb/mini_table/decode.h"
#include "upb/mini_table/encode_internal.hpp"
#include "upb/upb.h" #include "upb/upb.h"
#include "upb/upb.hpp" #include "upb/upb.hpp"
#include "upb/wire/decode.h" #include "upb/wire/decode.h"

@ -28,7 +28,7 @@
#ifndef UPB_REFLECTION_DESC_STATE_INTERNAL_H_ #ifndef UPB_REFLECTION_DESC_STATE_INTERNAL_H_
#define UPB_REFLECTION_DESC_STATE_INTERNAL_H_ #define UPB_REFLECTION_DESC_STATE_INTERNAL_H_
#include "upb/mini_table/encode.h" #include "upb/mini_table/encode_internal.h"
// Must be last. // Must be last.
#include "upb/port_def.inc" #include "upb/port_def.inc"

@ -28,7 +28,6 @@
#include <stdio.h> #include <stdio.h>
#include "upb/mini_table/decode.h" #include "upb/mini_table/decode.h"
#include "upb/mini_table/encode.h"
#include "upb/reflection/def_builder_internal.h" #include "upb/reflection/def_builder_internal.h"
#include "upb/reflection/def_type.h" #include "upb/reflection/def_type.h"
#include "upb/reflection/desc_state_internal.h" #include "upb/reflection/desc_state_internal.h"

@ -29,7 +29,6 @@
#include <errno.h> #include <errno.h>
#include "upb/mini_table/decode.h" #include "upb/mini_table/decode.h"
#include "upb/mini_table/encode.h"
#include "upb/reflection/def_builder_internal.h" #include "upb/reflection/def_builder_internal.h"
#include "upb/reflection/def_pool.h" #include "upb/reflection/def_pool.h"
#include "upb/reflection/def_type.h" #include "upb/reflection/def_type.h"

@ -95,6 +95,7 @@ cc_library(
deps = [ deps = [
":common", ":common",
"//:mini_table", "//:mini_table",
"//:mini_table_internal",
"//:upb", "//:upb",
"@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
@ -142,6 +143,7 @@ cc_binary(
":file_layout", ":file_layout",
":names", ":names",
"//:mini_table", "//:mini_table",
"//:mini_table_internal",
"//:port", "//:port",
"//:upb", "//:upb",
"@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/base:core_headers",

@ -28,7 +28,7 @@
#include <string> #include <string>
#include <unordered_set> #include <unordered_set>
#include "upb/mini_table.hpp" #include "upb/mini_table/encode_internal.hpp"
#include "upbc/common.h" #include "upbc/common.h"
namespace upbc { namespace upbc {

@ -30,7 +30,8 @@
#include "google/protobuf/descriptor.pb.h" #include "google/protobuf/descriptor.pb.h"
#include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_map.h"
#include "absl/strings/substitute.h" #include "absl/strings/substitute.h"
#include "upb/mini_table.hpp" #include "upb/mini_table/decode.h"
#include "upb/mini_table/encode_internal.hpp"
#include "upb/upb.hpp" #include "upb/upb.hpp"
namespace upbc { namespace upbc {

@ -33,7 +33,7 @@
#include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h" #include "absl/container/flat_hash_set.h"
#include "absl/strings/substitute.h" #include "absl/strings/substitute.h"
#include "upb/mini_table.hpp" #include "upb/mini_table/encode_internal.hpp"
#include "upbc/common.h" #include "upbc/common.h"
#include "upbc/file_layout.h" #include "upbc/file_layout.h"
#include "upbc/names.h" #include "upbc/names.h"

Loading…
Cancel
Save