Sha256: b3984d8267cc991d5f895f5d6b949699ecb54c26bfd280fa115d0ea299f73530

Contents?: true

Size: 1.88 KB

Versions: 8

Compression:

Stored size: 1.88 KB

Contents

// Protocol Buffers - Google's data interchange format
// Copyright 2023 Google LLC.  All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd

#ifndef UPB_MINI_TABLE_INTERNAL_FILE_H_
#define UPB_MINI_TABLE_INTERNAL_FILE_H_

// Must be last.
#include "upb/port/def.inc"

struct upb_MiniTableFile {
  const struct upb_MiniTable** UPB_PRIVATE(msgs);
  const struct upb_MiniTableEnum** UPB_PRIVATE(enums);
  const struct upb_MiniTableExtension** UPB_PRIVATE(exts);
  int UPB_PRIVATE(msg_count);
  int UPB_PRIVATE(enum_count);
  int UPB_PRIVATE(ext_count);
};

#ifdef __cplusplus
extern "C" {
#endif

UPB_INLINE int UPB_PRIVATE(_upb_MiniTableFile_EnumCount)(
    const struct upb_MiniTableFile* f) {
  return f->UPB_PRIVATE(enum_count);
}

UPB_INLINE int UPB_PRIVATE(_upb_MiniTableFile_ExtensionCount)(
    const struct upb_MiniTableFile* f) {
  return f->UPB_PRIVATE(ext_count);
}

UPB_INLINE int UPB_PRIVATE(_upb_MiniTableFile_MessageCount)(
    const struct upb_MiniTableFile* f) {
  return f->UPB_PRIVATE(msg_count);
}

UPB_INLINE const struct upb_MiniTableEnum* UPB_PRIVATE(_upb_MiniTableFile_Enum)(
    const struct upb_MiniTableFile* f, int i) {
  UPB_ASSERT(i < f->UPB_PRIVATE(enum_count));
  return f->UPB_PRIVATE(enums)[i];
}

UPB_INLINE const struct upb_MiniTableExtension* UPB_PRIVATE(
    _upb_MiniTableFile_Extension)(const struct upb_MiniTableFile* f, int i) {
  UPB_ASSERT(i < f->UPB_PRIVATE(ext_count));
  return f->UPB_PRIVATE(exts)[i];
}

UPB_INLINE const struct upb_MiniTable* UPB_PRIVATE(_upb_MiniTableFile_Message)(
    const struct upb_MiniTableFile* f, int i) {
  UPB_ASSERT(i < f->UPB_PRIVATE(msg_count));
  return f->UPB_PRIVATE(msgs)[i];
}

#ifdef __cplusplus
} /* extern "C" */
#endif

#include "upb/port/undef.inc"

#endif /* UPB_MINI_TABLE_INTERNAL_FILE_H_ */

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
grpc-1.63.2 third_party/upb/upb/mini_table/internal/file.h
grpc-1.64.3 third_party/upb/upb/mini_table/internal/file.h
grpc-1.65.2 third_party/upb/upb/mini_table/internal/file.h
grpc-1.65.1 third_party/upb/upb/mini_table/internal/file.h
grpc-1.65.0 third_party/upb/upb/mini_table/internal/file.h
grpc-1.65.0.pre2 third_party/upb/upb/mini_table/internal/file.h
grpc-1.65.0.pre1 third_party/upb/upb/mini_table/internal/file.h
grpc-1.63.0 third_party/upb/upb/mini_table/internal/file.h