Go to the documentation of this file.
36 size_t contents_size = 0;
44 if (
file ==
nullptr) {
50 contents_size =
static_cast<size_t>(ftell(
file));
52 contents =
static_cast<unsigned char*
>(
53 gpr_malloc(contents_size + (add_null_terminator ? 1 : 0)));
61 if (add_null_terminator) {
72 "Failed to load file", &
error, 1),
grpc_error_handle grpc_load_file(const char *filename, int add_null_terminator, grpc_slice *output)
const grpc_generator::File * file
GPRAPI grpc_slice grpc_slice_new(void *p, size_t len, void(*destroy)(void *))
GPRAPI void gpr_free(void *ptr)
GPRAPI void * gpr_malloc(size_t size)
#define GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(desc, errs, count)
grpc_error_handle grpc_error_set_str(grpc_error_handle src, grpc_error_strs which, absl::string_view str)
#define GRPC_OS_ERROR(err, call_name)
create an error associated with errno!=0 (an 'operating system' error)
GPRAPI grpc_slice grpc_empty_slice(void)
#define GRPC_SCHEDULING_END_BLOCKING_REGION_NO_EXEC_CTX
@ GRPC_ERROR_STR_FILENAME
filename that we were trying to read/write when this error occurred
#define GRPC_ERROR_UNREF(err)
#define GRPC_SCHEDULING_START_BLOCKING_REGION
#define GRPC_ERROR_IS_NONE(err)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:29