From 0cf6a71b7206ab7562c814bdd35a79fcfc9ec598 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 20 Jan 2017 14:07:05 -0800 Subject: Fix comments, merge head, regen project --- src/core/lib/slice/slice_buffer.c | 3 +-- src/ruby/ext/grpc/rb_grpc_imports.generated.c | 4 ++++ src/ruby/ext/grpc/rb_grpc_imports.generated.h | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/lib/slice/slice_buffer.c b/src/core/lib/slice/slice_buffer.c index 84fa89684f..b1bf0ceb23 100644 --- a/src/core/lib/slice/slice_buffer.c +++ b/src/core/lib/slice/slice_buffer.c @@ -51,7 +51,7 @@ static void maybe_embiggen(grpc_slice_buffer *sb) { sb->slices = sb->base_slices; } - /* How many far away from sb->base_slices is sb->slices pointer */ + /* How far away from sb->base_slices is sb->slices pointer */ size_t slice_offset = (size_t)(sb->slices - sb->base_slices); size_t slice_count = sb->count + slice_offset; @@ -168,7 +168,6 @@ void grpc_slice_buffer_addn(grpc_slice_buffer *sb, grpc_slice *s, size_t n) { } } -/* TODO (sreek) - Check where this is used and if this is still safe */ void grpc_slice_buffer_pop(grpc_slice_buffer *sb) { if (sb->count != 0) { size_t count = --sb->count; diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 230682e72d..d8d76cc1c5 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -215,7 +215,9 @@ grpc_slice_buffer_swap_type grpc_slice_buffer_swap_import; grpc_slice_buffer_move_into_type grpc_slice_buffer_move_into_import; grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import; grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import; +grpc_slice_buffer_move_first_into_buffer_type grpc_slice_buffer_move_first_into_buffer_import; grpc_slice_buffer_take_first_type grpc_slice_buffer_take_first_import; +grpc_slice_buffer_undo_take_first_type grpc_slice_buffer_undo_take_first_import; gpr_malloc_type gpr_malloc_import; gpr_free_type gpr_free_import; gpr_realloc_type gpr_realloc_import; @@ -504,7 +506,9 @@ void grpc_rb_load_imports(HMODULE library) { grpc_slice_buffer_move_into_import = (grpc_slice_buffer_move_into_type) GetProcAddress(library, "grpc_slice_buffer_move_into"); grpc_slice_buffer_trim_end_import = (grpc_slice_buffer_trim_end_type) GetProcAddress(library, "grpc_slice_buffer_trim_end"); grpc_slice_buffer_move_first_import = (grpc_slice_buffer_move_first_type) GetProcAddress(library, "grpc_slice_buffer_move_first"); + grpc_slice_buffer_move_first_into_buffer_import = (grpc_slice_buffer_move_first_into_buffer_type) GetProcAddress(library, "grpc_slice_buffer_move_first_into_buffer"); grpc_slice_buffer_take_first_import = (grpc_slice_buffer_take_first_type) GetProcAddress(library, "grpc_slice_buffer_take_first"); + grpc_slice_buffer_undo_take_first_import = (grpc_slice_buffer_undo_take_first_type) GetProcAddress(library, "grpc_slice_buffer_undo_take_first"); gpr_malloc_import = (gpr_malloc_type) GetProcAddress(library, "gpr_malloc"); gpr_free_import = (gpr_free_type) GetProcAddress(library, "gpr_free"); gpr_realloc_import = (gpr_realloc_type) GetProcAddress(library, "gpr_realloc"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 4c4f655b86..7a145be447 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -596,9 +596,15 @@ extern grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import; typedef void(*grpc_slice_buffer_move_first_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst); extern grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import; #define grpc_slice_buffer_move_first grpc_slice_buffer_move_first_import +typedef void(*grpc_slice_buffer_move_first_into_buffer_type)(grpc_slice_buffer *src, size_t n, void *dst); +extern grpc_slice_buffer_move_first_into_buffer_type grpc_slice_buffer_move_first_into_buffer_import; +#define grpc_slice_buffer_move_first_into_buffer grpc_slice_buffer_move_first_into_buffer_import typedef grpc_slice(*grpc_slice_buffer_take_first_type)(grpc_slice_buffer *src); extern grpc_slice_buffer_take_first_type grpc_slice_buffer_take_first_import; #define grpc_slice_buffer_take_first grpc_slice_buffer_take_first_import +typedef void(*grpc_slice_buffer_undo_take_first_type)(grpc_slice_buffer *src, grpc_slice slice); +extern grpc_slice_buffer_undo_take_first_type grpc_slice_buffer_undo_take_first_import; +#define grpc_slice_buffer_undo_take_first grpc_slice_buffer_undo_take_first_import typedef void *(*gpr_malloc_type)(size_t size); extern gpr_malloc_type gpr_malloc_import; #define gpr_malloc gpr_malloc_import -- cgit v1.2.3