Sha256: 90618e8ddb10ac378a35f494365d113fc20541f0391cfc88ed33cf14358117d6

Contents?: true

Size: 1.83 KB

Versions: 16

Compression:

Stored size: 1.83 KB

Contents

/*
 *
 * Copyright 2016 gRPC authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H
#define GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H

#include <grpc/support/port_platform.h>

#include <grpc/slice.h>
#include <grpc/slice_buffer.h>

grpc_slice grpc_slice_ref_internal(grpc_slice slice);
void grpc_slice_unref_internal(grpc_slice slice);
void grpc_slice_buffer_reset_and_unref_internal(grpc_slice_buffer* sb);
void grpc_slice_buffer_partial_unref_internal(grpc_slice_buffer* sb,
                                              size_t idx);
void grpc_slice_buffer_destroy_internal(grpc_slice_buffer* sb);

/* Check if a slice is interned */
bool grpc_slice_is_interned(grpc_slice slice);

void grpc_slice_intern_init(void);
void grpc_slice_intern_shutdown(void);
void grpc_test_only_set_slice_hash_seed(uint32_t key);
// if slice matches a static slice, returns the static slice
// otherwise returns the passed in slice (without reffing it)
// used for surface boundaries where we might receive an un-interned static
// string
grpc_slice grpc_slice_maybe_static_intern(grpc_slice slice,
                                          bool* returned_slice_is_different);
uint32_t grpc_static_slice_hash(grpc_slice s);
int grpc_static_slice_eq(grpc_slice a, grpc_slice b);

#endif /* GRPC_CORE_LIB_SLICE_SLICE_INTERNAL_H */

Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
grpc-z-1.11.1 src/core/lib/slice/slice_internal.h
grpc-flamingo-1.15.0 src/core/lib/slice/slice_internal.h
grpc-flamingo-1.11.0 src/core/lib/slice/slice_internal.h
grpc-1.15.0 src/core/lib/slice/slice_internal.h
grpc-1.14.2 src/core/lib/slice/slice_internal.h
grpc-1.15.0.pre1 src/core/lib/slice/slice_internal.h
grpc-1.14.2.pre1 src/core/lib/slice/slice_internal.h
grpc-1.14.1 src/core/lib/slice/slice_internal.h
grpc-1.14.0 src/core/lib/slice/slice_internal.h
grpc-1.13.0 src/core/lib/slice/slice_internal.h
grpc-1.13.0.pre3 src/core/lib/slice/slice_internal.h
grpc-1.13.0.pre1 src/core/lib/slice/slice_internal.h
grpc-1.11.1 src/core/lib/slice/slice_internal.h
grpc-1.12.0 src/core/lib/slice/slice_internal.h
grpc-1.11.0 src/core/lib/slice/slice_internal.h
grpc-1.11.0.pre2 src/core/lib/slice/slice_internal.h