Sha256: 6a016570d52bae398d1be549c48e00f863ea5451592cfde7cc7449e6f525d15b

Contents?: true

Size: 1.33 KB

Versions: 9

Compression:

Stored size: 1.33 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_BASE_STATUS_H_
#define UPB_BASE_STATUS_H_

#include <stdarg.h>

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

#define _kUpb_Status_MaxMessage 127

typedef struct {
  bool ok;
  char msg[_kUpb_Status_MaxMessage];  // Error message; NULL-terminated.
} upb_Status;

#ifdef __cplusplus
extern "C" {
#endif

UPB_API const char* upb_Status_ErrorMessage(const upb_Status* status);
UPB_API bool upb_Status_IsOk(const upb_Status* status);

// These are no-op if |status| is NULL.
UPB_API void upb_Status_Clear(upb_Status* status);
void upb_Status_SetErrorMessage(upb_Status* status, const char* msg);
void upb_Status_SetErrorFormat(upb_Status* status, const char* fmt, ...)
    UPB_PRINTF(2, 3);
void upb_Status_VSetErrorFormat(upb_Status* status, const char* fmt,
                                va_list args) UPB_PRINTF(2, 0);
void upb_Status_VAppendErrorFormat(upb_Status* status, const char* fmt,
                                   va_list args) UPB_PRINTF(2, 0);

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

#include "upb/port/undef.inc"

#endif /* UPB_BASE_STATUS_H_ */

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
grpc-1.60.2 third_party/upb/upb/base/status.h
grpc-1.61.3 third_party/upb/upb/base/status.h
grpc-1.62.3 third_party/upb/upb/base/status.h
grpc-1.62.0 third_party/upb/upb/base/status.h
grpc-1.62.0.pre1 third_party/upb/upb/base/status.h
grpc-1.61.0 third_party/upb/upb/base/status.h
grpc-1.61.0.pre2 third_party/upb/upb/base/status.h
grpc-1.60.0 third_party/upb/upb/base/status.h
grpc-1.60.0.pre1 third_party/upb/upb/base/status.h