Sha256: e72e0e01ea073e0520e05a2d807026486de1a4c626a510205d68cd0d160b2453

Contents?: true

Size: 958 Bytes

Versions: 22

Compression:

Stored size: 958 Bytes

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

#include "upb/reflection/def_type.h"

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

upb_deftype_t _upb_DefType_Type(upb_value v) {
  const uintptr_t num = (uintptr_t)upb_value_getconstptr(v);
  return num & UPB_DEFTYPE_MASK;
}

upb_value _upb_DefType_Pack(const void* ptr, upb_deftype_t type) {
  uintptr_t num = (uintptr_t)ptr;
  UPB_ASSERT((num & UPB_DEFTYPE_MASK) == 0);
  num |= type;
  return upb_value_constptr((const void*)num);
}

const void* _upb_DefType_Unpack(upb_value v, upb_deftype_t type) {
  uintptr_t num = (uintptr_t)upb_value_getconstptr(v);
  return (num & UPB_DEFTYPE_MASK) == type
             ? (const void*)(num & ~UPB_DEFTYPE_MASK)
             : NULL;
}

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
grpc-1.67.0 third_party/upb/upb/reflection/def_type.c
grpc-1.67.0.pre1 third_party/upb/upb/reflection/def_type.c
grpc-1.66.0 third_party/upb/upb/reflection/def_type.c
grpc-1.66.0.pre5 third_party/upb/upb/reflection/def_type.c
grpc-1.66.0.pre3 third_party/upb/upb/reflection/def_type.c
grpc-1.60.2 third_party/upb/upb/reflection/def_type.c
grpc-1.61.3 third_party/upb/upb/reflection/def_type.c
grpc-1.62.3 third_party/upb/upb/reflection/def_type.c
grpc-1.63.2 third_party/upb/upb/reflection/def_type.c
grpc-1.64.3 third_party/upb/upb/reflection/def_type.c
grpc-1.65.2 third_party/upb/upb/reflection/def_type.c
grpc-1.65.1 third_party/upb/upb/reflection/def_type.c
grpc-1.65.0 third_party/upb/upb/reflection/def_type.c
grpc-1.65.0.pre2 third_party/upb/upb/reflection/def_type.c
grpc-1.65.0.pre1 third_party/upb/upb/reflection/def_type.c
grpc-1.63.0 third_party/upb/upb/reflection/def_type.c
grpc-1.62.0 third_party/upb/upb/reflection/def_type.c
grpc-1.62.0.pre1 third_party/upb/upb/reflection/def_type.c
grpc-1.61.0 third_party/upb/upb/reflection/def_type.c
grpc-1.61.0.pre2 third_party/upb/upb/reflection/def_type.c