Skip to content

Commit

Permalink
Merge branch 'shush-chaotic-protocol' into shush-multipass
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Jan 22, 2024
2 parents 1119e26 + e821e87 commit a5cdfe9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions include/grpc/support/port_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,14 @@ typedef unsigned __int64 uint64_t;
#endif
#endif

#ifndef GRPC_REINITIALIZES
#if GPR_HAS_CPP_ATTRIBUTE(clang::reinitializes)
#define GRPC_REINITIALIZES [[clang::reinitializes]]
#else
#define GRPC_REINITIALIZES
#endif
#endif

#ifndef GPR_HAS_ATTRIBUTE
#ifdef __has_attribute
#define GPR_HAS_ATTRIBUTE(a) __has_attribute(a)
Expand Down
4 changes: 3 additions & 1 deletion src/core/lib/slice/slice_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ class SliceBuffer {
}

/// Removes and unrefs all slices in the SliceBuffer.
void Clear() { grpc_slice_buffer_reset_and_unref(&slice_buffer_); }
GRPC_REINITIALIZES void Clear() {
grpc_slice_buffer_reset_and_unref(&slice_buffer_);
}

/// Removes the first slice in the SliceBuffer and returns it.
Slice TakeFirst();
Expand Down

0 comments on commit a5cdfe9

Please sign in to comment.