Skip to content

Commit 62643e3

Browse files
honglookercopybara-github
authored andcommitted
hpb: refactor multibackend constants to hpb/multibackend.h
PiperOrigin-RevId: 758683214
1 parent 4f74764 commit 62643e3

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

hpb/hpb.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@
1616
#include "google/protobuf/hpb/arena.h"
1717
#include "google/protobuf/hpb/extension.h"
1818
#include "google/protobuf/hpb/internal/template_help.h"
19+
#include "google/protobuf/hpb/multibackend.h"
1920
#include "google/protobuf/hpb/ptr.h"
2021
#include "google/protobuf/hpb/status.h"
2122

22-
#define HPB_INTERNAL_BACKEND_UPB 1
23-
#define HPB_INTERNAL_BACKEND_CPP 2
24-
2523
#if HPB_INTERNAL_BACKEND == HPB_INTERNAL_BACKEND_UPB
2624
#include "google/protobuf/hpb/backend/upb/interop.h"
2725
#include "google/protobuf/hpb/backend/upb/upb.h"
2826
#include "upb/wire/decode.h"
29-
3027
#elif HPB_INTERNAL_BACKEND == HPB_INTERNAL_BACKEND_CPP
3128
#include "google/protobuf/hpb/backend/cpp/cpp.h"
3229
#else

hpb/multibackend.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Protocol Buffers - Google's data interchange format
2+
// Copyright 2025 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 GOOGLE_PROTOBUF_HPB_MULTIBACKEND_H__
9+
#define GOOGLE_PROTOBUF_HPB_MULTIBACKEND_H__
10+
11+
#define HPB_INTERNAL_BACKEND_UPB 1
12+
#define HPB_INTERNAL_BACKEND_CPP 2
13+
14+
#endif // GOOGLE_PROTOBUF_HPB_MULTIBACKEND_H__

0 commit comments

Comments
 (0)