wearefair-grpc 1.3.1.pre.c → 1.4.0.fair

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +418 -126
  3. data/include/grpc/grpc.h +15 -69
  4. data/include/grpc/grpc_security.h +1 -1
  5. data/include/grpc/impl/codegen/compression_types.h +3 -4
  6. data/include/grpc/impl/codegen/gpr_types.h +0 -1
  7. data/include/grpc/impl/codegen/grpc_types.h +69 -3
  8. data/include/grpc/impl/codegen/port_platform.h +6 -0
  9. data/include/grpc/impl/codegen/slice.h +2 -1
  10. data/include/grpc/load_reporting.h +6 -6
  11. data/include/grpc/slice.h +25 -3
  12. data/include/grpc/slice_buffer.h +4 -0
  13. data/src/core/ext/census/context.c +1 -1
  14. data/src/core/ext/census/resource.c +3 -1
  15. data/src/core/ext/filters/client_channel/channel_connectivity.c +1 -1
  16. data/src/core/ext/filters/client_channel/client_channel.c +158 -100
  17. data/src/core/ext/filters/client_channel/client_channel_plugin.c +3 -2
  18. data/src/core/ext/filters/client_channel/lb_policy.c +2 -1
  19. data/src/core/ext/filters/client_channel/lb_policy.h +5 -6
  20. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.c +153 -0
  21. data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h +42 -0
  22. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.c +344 -88
  23. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.c +133 -0
  24. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +65 -0
  25. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.c +47 -5
  26. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +6 -0
  27. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +19 -8
  28. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +63 -34
  29. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.c +2 -1
  30. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.c +13 -12
  31. data/src/core/ext/filters/client_channel/lb_policy_factory.c +28 -5
  32. data/src/core/ext/filters/client_channel/lb_policy_factory.h +18 -4
  33. data/src/core/ext/filters/client_channel/parse_address.c +37 -7
  34. data/src/core/ext/filters/client_channel/parse_address.h +11 -8
  35. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.c +3 -3
  36. data/src/core/ext/filters/client_channel/subchannel.c +19 -16
  37. data/src/core/ext/filters/client_channel/subchannel.h +1 -0
  38. data/src/core/ext/filters/client_channel/uri_parser.c +36 -22
  39. data/src/core/ext/filters/client_channel/uri_parser.h +1 -1
  40. data/src/core/{lib/channel → ext/filters/deadline}/deadline_filter.c +42 -17
  41. data/src/core/{lib/channel → ext/filters/deadline}/deadline_filter.h +8 -9
  42. data/src/core/{lib/channel → ext/filters/http/client}/http_client_filter.c +19 -11
  43. data/src/core/{lib/channel → ext/filters/http/client}/http_client_filter.h +3 -6
  44. data/src/core/ext/filters/http/http_filters_plugin.c +104 -0
  45. data/src/core/{lib/channel/compress_filter.c → ext/filters/http/message_compress/message_compress_filter.c} +124 -23
  46. data/src/core/{lib/channel/compress_filter.h → ext/filters/http/message_compress/message_compress_filter.h} +5 -6
  47. data/src/core/{lib/channel → ext/filters/http/server}/http_server_filter.c +4 -6
  48. data/src/core/{lib/channel → ext/filters/http/server}/http_server_filter.h +3 -3
  49. data/src/core/ext/filters/load_reporting/load_reporting.c +2 -25
  50. data/src/core/ext/filters/load_reporting/load_reporting_filter.c +26 -1
  51. data/src/core/ext/filters/max_age/max_age_filter.c +14 -14
  52. data/src/core/{lib/channel → ext/filters/message_size}/message_size_filter.c +91 -47
  53. data/src/core/{lib/channel → ext/filters/message_size}/message_size_filter.h +3 -3
  54. data/src/core/ext/transport/chttp2/client/insecure/channel_create.c +1 -1
  55. data/src/core/ext/transport/chttp2/server/chttp2_server.c +2 -2
  56. data/src/core/ext/transport/chttp2/transport/bin_decoder.c +2 -2
  57. data/src/core/ext/transport/chttp2/transport/bin_encoder.c +3 -3
  58. data/src/core/ext/transport/chttp2/transport/chttp2_transport.c +296 -172
  59. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +3 -2
  60. data/src/core/ext/transport/chttp2/transport/frame_data.c +203 -164
  61. data/src/core/ext/transport/chttp2/transport/frame_data.h +8 -14
  62. data/src/core/ext/transport/chttp2/transport/frame_goaway.c +1 -1
  63. data/src/core/ext/transport/chttp2/transport/frame_ping.c +1 -1
  64. data/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +1 -1
  65. data/src/core/ext/transport/chttp2/transport/frame_settings.c +5 -5
  66. data/src/core/ext/transport/chttp2/transport/frame_window_update.c +1 -1
  67. data/src/core/ext/transport/chttp2/transport/hpack_encoder.c +4 -4
  68. data/src/core/ext/transport/chttp2/transport/hpack_parser.c +2 -4
  69. data/src/core/ext/transport/chttp2/transport/hpack_table.c +4 -3
  70. data/src/core/ext/transport/chttp2/transport/internal.h +50 -33
  71. data/src/core/ext/transport/chttp2/transport/parsing.c +10 -11
  72. data/src/core/ext/transport/chttp2/transport/writing.c +32 -13
  73. data/src/core/lib/channel/channel_args.c +28 -9
  74. data/src/core/lib/channel/channel_args.h +5 -1
  75. data/src/core/lib/channel/channel_stack.c +1 -1
  76. data/src/core/lib/channel/channel_stack.h +2 -2
  77. data/src/core/lib/channel/channel_stack_builder.c +13 -1
  78. data/src/core/lib/channel/channel_stack_builder.h +5 -1
  79. data/src/core/lib/channel/connected_channel.c +3 -1
  80. data/src/core/lib/channel/context.h +2 -2
  81. data/src/core/lib/compression/message_compress.c +2 -2
  82. data/src/core/lib/debug/trace.c +13 -6
  83. data/src/core/lib/debug/trace.h +27 -1
  84. data/src/core/lib/http/httpcli.c +1 -1
  85. data/src/core/lib/http/httpcli_security_connector.c +6 -10
  86. data/src/core/lib/http/parser.c +2 -2
  87. data/src/core/lib/http/parser.h +2 -1
  88. data/src/core/lib/iomgr/combiner.c +6 -6
  89. data/src/core/lib/iomgr/combiner.h +2 -1
  90. data/src/core/lib/iomgr/error.c +12 -5
  91. data/src/core/lib/iomgr/error.h +13 -13
  92. data/src/core/lib/iomgr/ev_epoll1_linux.c +984 -0
  93. data/src/core/lib/iomgr/ev_epoll1_linux.h +44 -0
  94. data/src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c +2146 -0
  95. data/src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h +43 -0
  96. data/src/core/lib/iomgr/ev_epoll_thread_pool_linux.c +1337 -0
  97. data/src/core/lib/iomgr/ev_epoll_thread_pool_linux.h +43 -0
  98. data/src/core/lib/iomgr/ev_epollex_linux.c +1511 -0
  99. data/src/core/lib/iomgr/ev_epollex_linux.h +43 -0
  100. data/src/core/lib/iomgr/{ev_epoll_linux.c → ev_epollsig_linux.c} +24 -31
  101. data/src/core/lib/iomgr/{ev_epoll_linux.h → ev_epollsig_linux.h} +4 -4
  102. data/src/core/lib/iomgr/ev_poll_posix.c +12 -27
  103. data/src/core/lib/iomgr/ev_poll_posix.h +2 -2
  104. data/src/core/lib/iomgr/ev_posix.c +22 -8
  105. data/src/core/lib/iomgr/ev_posix.h +4 -3
  106. data/src/core/lib/iomgr/exec_ctx.c +5 -0
  107. data/src/core/lib/iomgr/exec_ctx.h +2 -0
  108. data/src/core/lib/iomgr/iomgr.c +4 -0
  109. data/src/core/lib/iomgr/iomgr.h +3 -0
  110. data/src/core/lib/iomgr/is_epollexclusive_available.c +116 -0
  111. data/src/core/lib/iomgr/is_epollexclusive_available.h +41 -0
  112. data/src/core/lib/iomgr/lockfree_event.c +16 -0
  113. data/src/core/lib/iomgr/pollset.h +2 -5
  114. data/src/core/lib/iomgr/pollset_uv.c +1 -1
  115. data/src/core/lib/iomgr/pollset_windows.c +3 -3
  116. data/src/core/lib/iomgr/resource_quota.c +9 -8
  117. data/src/core/lib/iomgr/resource_quota.h +2 -1
  118. data/src/core/lib/iomgr/sockaddr_utils.h +1 -1
  119. data/src/core/lib/iomgr/socket_mutator.h +2 -0
  120. data/src/core/lib/iomgr/sys_epoll_wrapper.h +43 -0
  121. data/src/core/lib/iomgr/tcp_client_posix.c +6 -6
  122. data/src/core/lib/iomgr/tcp_client_uv.c +3 -3
  123. data/src/core/lib/iomgr/tcp_posix.c +7 -7
  124. data/src/core/lib/iomgr/tcp_posix.h +2 -1
  125. data/src/core/lib/iomgr/tcp_server_posix.c +1 -1
  126. data/src/core/lib/iomgr/tcp_uv.c +6 -6
  127. data/src/core/lib/iomgr/tcp_uv.h +2 -1
  128. data/src/core/lib/iomgr/tcp_windows.c +1 -1
  129. data/src/core/lib/iomgr/timer_generic.c +24 -25
  130. data/src/core/lib/iomgr/timer_manager.c +276 -0
  131. data/src/core/lib/iomgr/timer_manager.h +52 -0
  132. data/src/core/lib/iomgr/timer_uv.c +6 -0
  133. data/src/core/lib/iomgr/udp_server.c +42 -9
  134. data/src/core/lib/iomgr/udp_server.h +3 -1
  135. data/src/core/lib/security/credentials/credentials.c +0 -1
  136. data/src/core/lib/security/credentials/fake/fake_credentials.c +23 -0
  137. data/src/core/lib/security/credentials/fake/fake_credentials.h +12 -9
  138. data/src/core/lib/security/credentials/google_default/google_default_credentials.c +1 -1
  139. data/src/core/lib/security/credentials/jwt/jwt_credentials.c +1 -1
  140. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +1 -1
  141. data/src/core/lib/security/credentials/ssl/ssl_credentials.c +24 -53
  142. data/src/core/lib/security/transport/client_auth_filter.c +9 -3
  143. data/src/core/lib/security/transport/secure_endpoint.c +7 -7
  144. data/src/core/lib/security/transport/secure_endpoint.h +1 -1
  145. data/src/core/lib/security/transport/security_connector.c +32 -51
  146. data/src/core/lib/security/transport/security_connector.h +10 -14
  147. data/src/core/lib/slice/b64.c +1 -1
  148. data/src/core/lib/slice/percent_encoding.c +3 -3
  149. data/src/core/lib/slice/slice.c +66 -33
  150. data/src/core/lib/slice/slice_buffer.c +25 -6
  151. data/src/core/lib/slice/slice_hash_table.c +33 -35
  152. data/src/core/lib/slice/slice_hash_table.h +7 -12
  153. data/src/core/lib/support/atomic.h +45 -0
  154. data/src/core/lib/support/atomic_with_atm.h +70 -0
  155. data/src/core/lib/support/atomic_with_std.h +48 -0
  156. data/src/core/lib/support/avl.c +14 -14
  157. data/src/core/lib/support/memory.h +74 -0
  158. data/src/core/lib/support/mpscq.c +12 -1
  159. data/src/core/lib/support/mpscq.h +4 -0
  160. data/src/core/lib/support/stack_lockfree.c +3 -36
  161. data/src/core/lib/support/time_posix.c +8 -0
  162. data/src/core/lib/support/tmpfile_posix.c +10 -10
  163. data/src/core/lib/surface/alarm.c +3 -1
  164. data/src/core/lib/surface/api_trace.c +2 -1
  165. data/src/core/lib/surface/api_trace.h +2 -2
  166. data/src/core/lib/surface/byte_buffer_reader.c +1 -1
  167. data/src/core/lib/surface/call.c +65 -22
  168. data/src/core/lib/surface/call.h +4 -2
  169. data/src/core/lib/surface/channel_init.c +2 -19
  170. data/src/core/lib/surface/channel_stack_type.c +18 -0
  171. data/src/core/lib/surface/channel_stack_type.h +2 -0
  172. data/src/core/lib/surface/completion_queue.c +249 -83
  173. data/src/core/lib/surface/completion_queue.h +18 -13
  174. data/src/core/lib/surface/completion_queue_factory.c +24 -9
  175. data/src/core/lib/surface/init.c +1 -52
  176. data/src/core/lib/surface/{lame_client.c → lame_client.cc} +37 -26
  177. data/src/core/lib/surface/server.c +50 -27
  178. data/src/core/lib/surface/server.h +2 -1
  179. data/src/core/lib/surface/version.c +2 -2
  180. data/src/core/lib/transport/bdp_estimator.c +20 -9
  181. data/src/core/lib/transport/bdp_estimator.h +5 -1
  182. data/src/core/lib/transport/byte_stream.c +23 -9
  183. data/src/core/lib/transport/byte_stream.h +15 -6
  184. data/src/core/lib/transport/connectivity_state.c +6 -6
  185. data/src/core/lib/transport/connectivity_state.h +2 -1
  186. data/src/core/lib/transport/service_config.c +6 -13
  187. data/src/core/lib/transport/service_config.h +2 -2
  188. data/src/core/lib/transport/static_metadata.c +403 -389
  189. data/src/core/lib/transport/static_metadata.h +127 -114
  190. data/src/core/plugin_registry/grpc_plugin_registry.c +12 -0
  191. data/src/core/tsi/fake_transport_security.c +5 -4
  192. data/src/core/tsi/ssl_transport_security.c +71 -82
  193. data/src/core/tsi/ssl_transport_security.h +39 -61
  194. data/src/core/tsi/transport_security.c +83 -2
  195. data/src/core/tsi/transport_security.h +27 -2
  196. data/src/core/tsi/transport_security_adapter.c +236 -0
  197. data/src/core/tsi/transport_security_adapter.h +62 -0
  198. data/src/core/tsi/transport_security_interface.h +179 -66
  199. data/src/ruby/ext/grpc/extconf.rb +2 -1
  200. data/src/ruby/ext/grpc/rb_byte_buffer.c +8 -6
  201. data/src/ruby/ext/grpc/rb_call.c +56 -48
  202. data/src/ruby/ext/grpc/rb_call.h +3 -4
  203. data/src/ruby/ext/grpc/rb_call_credentials.c +23 -22
  204. data/src/ruby/ext/grpc/rb_channel.c +45 -29
  205. data/src/ruby/ext/grpc/rb_channel_args.c +11 -9
  206. data/src/ruby/ext/grpc/rb_channel_credentials.c +16 -12
  207. data/src/ruby/ext/grpc/rb_completion_queue.c +7 -9
  208. data/src/ruby/ext/grpc/rb_compression_options.c +7 -6
  209. data/src/ruby/ext/grpc/rb_event_thread.c +10 -12
  210. data/src/ruby/ext/grpc/rb_event_thread.h +1 -2
  211. data/src/ruby/ext/grpc/rb_grpc.c +11 -15
  212. data/src/ruby/ext/grpc/rb_grpc.h +2 -2
  213. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +14 -6
  214. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +22 -10
  215. data/src/ruby/ext/grpc/rb_server.c +26 -28
  216. data/src/ruby/lib/grpc/version.rb +1 -1
  217. metadata +40 -18
  218. data/src/ruby/lib/grpc/grpc_c.bundle +0 -0
  219. data/src/ruby/lib/grpc/grpc_c.so +0 -0
@@ -33,14 +33,14 @@
33
33
 
34
34
  #include <ruby/ruby.h>
35
35
 
36
- #include "rb_grpc_imports.generated.h"
37
36
  #include "rb_completion_queue.h"
37
+ #include "rb_grpc_imports.generated.h"
38
38
 
39
39
  #include <ruby/thread.h>
40
40
 
41
41
  #include <grpc/grpc.h>
42
- #include <grpc/support/time.h>
43
42
  #include <grpc/support/log.h>
43
+ #include <grpc/support/time.h>
44
44
  #include "rb_grpc.h"
45
45
 
46
46
  /* Used to allow grpc_completion_queue_next call to release the GIL */
@@ -54,14 +54,13 @@ typedef struct next_call_stack {
54
54
 
55
55
  /* Calls grpc_completion_queue_pluck without holding the ruby GIL */
56
56
  static void *grpc_rb_completion_queue_pluck_no_gil(void *param) {
57
- next_call_stack *const next_call = (next_call_stack*)param;
57
+ next_call_stack *const next_call = (next_call_stack *)param;
58
58
  gpr_timespec increment = gpr_time_from_millis(20, GPR_TIMESPAN);
59
59
  gpr_timespec deadline;
60
60
  do {
61
61
  deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), increment);
62
- next_call->event = grpc_completion_queue_pluck(next_call->cq,
63
- next_call->tag,
64
- deadline, NULL);
62
+ next_call->event = grpc_completion_queue_pluck(
63
+ next_call->cq, next_call->tag, deadline, NULL);
65
64
  if (next_call->event.type != GRPC_QUEUE_TIMEOUT ||
66
65
  gpr_time_cmp(deadline, next_call->timeout) > 0) {
67
66
  break;
@@ -81,7 +80,7 @@ void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq) {
81
80
  }
82
81
 
83
82
  static void unblock_func(void *param) {
84
- next_call_stack *const next_call = (next_call_stack*)param;
83
+ next_call_stack *const next_call = (next_call_stack *)param;
85
84
  next_call->interrupted = 1;
86
85
  }
87
86
 
@@ -111,7 +110,6 @@ grpc_event rb_completion_queue_pluck(grpc_completion_queue *queue, void *tag,
111
110
  (void *)&next_call);
112
111
  /* If an interrupt prevented pluck from returning useful information, then
113
112
  any plucks that did complete must have timed out */
114
- } while (next_call.interrupted &&
115
- next_call.event.type == GRPC_QUEUE_TIMEOUT);
113
+ } while (next_call.interrupted && next_call.event.type == GRPC_QUEUE_TIMEOUT);
116
114
  return next_call.event;
117
115
  }
@@ -33,15 +33,15 @@
33
33
 
34
34
  #include <ruby/ruby.h>
35
35
 
36
- #include "rb_compression_options.h"
37
36
  #include "rb_byte_buffer.h"
37
+ #include "rb_compression_options.h"
38
38
  #include "rb_grpc_imports.generated.h"
39
39
 
40
40
  #include <grpc/compression.h>
41
41
  #include <grpc/grpc.h>
42
- #include <grpc/support/alloc.h>
43
42
  #include <grpc/impl/codegen/compression_types.h>
44
43
  #include <grpc/impl/codegen/grpc_types.h>
44
+ #include <grpc/support/alloc.h>
45
45
  #include <string.h>
46
46
 
47
47
  #include "rb_grpc.h"
@@ -182,15 +182,16 @@ void grpc_rb_compression_options_algorithm_name_to_value_internal(
182
182
  * correct C string out of it. */
183
183
  algorithm_name_as_string = rb_funcall(algorithm_name, rb_intern("to_s"), 0);
184
184
 
185
- name_slice = grpc_slice_from_copied_buffer(RSTRING_PTR(algorithm_name_as_string), RSTRING_LEN(algorithm_name_as_string));
185
+ name_slice =
186
+ grpc_slice_from_copied_buffer(RSTRING_PTR(algorithm_name_as_string),
187
+ RSTRING_LEN(algorithm_name_as_string));
186
188
 
187
189
  /* Raise an error if the name isn't recognized as a compression algorithm by
188
190
  * the algorithm parse function
189
191
  * in GRPC core. */
190
- if(!grpc_compression_algorithm_parse(name_slice, algorithm_value)) {
192
+ if (!grpc_compression_algorithm_parse(name_slice, algorithm_value)) {
191
193
  tmp_str = grpc_slice_to_c_string(name_slice);
192
- rb_raise(rb_eNameError, "Invalid compression algorithm name: %s",
193
- tmp_str);
194
+ rb_raise(rb_eNameError, "Invalid compression algorithm name: %s", tmp_str);
194
195
  }
195
196
 
196
197
  grpc_slice_unref(name_slice);
@@ -33,20 +33,20 @@
33
33
 
34
34
  #include <ruby/ruby.h>
35
35
 
36
- #include "rb_grpc_imports.generated.h"
37
36
  #include "rb_event_thread.h"
37
+ #include "rb_grpc_imports.generated.h"
38
38
 
39
39
  #include <stdbool.h>
40
40
 
41
- #include <ruby/thread.h>
42
41
  #include <grpc/support/alloc.h>
42
+ #include <grpc/support/log.h>
43
43
  #include <grpc/support/sync.h>
44
44
  #include <grpc/support/time.h>
45
- #include <grpc/support/log.h>
45
+ #include <ruby/thread.h>
46
46
 
47
47
  typedef struct grpc_rb_event {
48
48
  // callback will be called with argument while holding the GVL
49
- void (*callback)(void*);
49
+ void (*callback)(void *);
50
50
  void *argument;
51
51
 
52
52
  struct grpc_rb_event *next;
@@ -65,8 +65,7 @@ typedef struct grpc_rb_event_queue {
65
65
 
66
66
  static grpc_rb_event_queue event_queue;
67
67
 
68
- void grpc_rb_event_queue_enqueue(void (*callback)(void*),
69
- void *argument) {
68
+ void grpc_rb_event_queue_enqueue(void (*callback)(void *), void *argument) {
70
69
  grpc_rb_event *event = gpr_malloc(sizeof(grpc_rb_event));
71
70
  event->callback = callback;
72
71
  event->argument = argument;
@@ -107,8 +106,7 @@ static void *grpc_rb_wait_for_event_no_gil(void *param) {
107
106
  (void)param;
108
107
  gpr_mu_lock(&event_queue.mu);
109
108
  while ((event = grpc_rb_event_queue_dequeue()) == NULL) {
110
- gpr_cv_wait(&event_queue.cv,
111
- &event_queue.mu,
109
+ gpr_cv_wait(&event_queue.cv, &event_queue.mu,
112
110
  gpr_inf_future(GPR_CLOCK_REALTIME));
113
111
  if (event_queue.abort) {
114
112
  gpr_mu_unlock(&event_queue.mu);
@@ -132,10 +130,10 @@ static void grpc_rb_event_unblocking_func(void *arg) {
132
130
  static VALUE grpc_rb_event_thread(VALUE arg) {
133
131
  grpc_rb_event *event;
134
132
  (void)arg;
135
- while(true) {
136
- event = (grpc_rb_event*)rb_thread_call_without_gvl(
137
- grpc_rb_wait_for_event_no_gil, NULL,
138
- grpc_rb_event_unblocking_func, NULL);
133
+ while (true) {
134
+ event = (grpc_rb_event *)rb_thread_call_without_gvl(
135
+ grpc_rb_wait_for_event_no_gil, NULL, grpc_rb_event_unblocking_func,
136
+ NULL);
139
137
  if (event == NULL) {
140
138
  // Indicates that the thread needs to shut down
141
139
  break;
@@ -33,5 +33,4 @@
33
33
 
34
34
  void grpc_rb_event_queue_thread_start();
35
35
 
36
- void grpc_rb_event_queue_enqueue(void (*callback)(void*),
37
- void *argument);
36
+ void grpc_rb_event_queue_enqueue(void (*callback)(void *), void *argument);
@@ -33,8 +33,8 @@
33
33
 
34
34
  #include <ruby/ruby.h>
35
35
 
36
- #include "rb_grpc_imports.generated.h"
37
36
  #include "rb_grpc.h"
37
+ #include "rb_grpc_imports.generated.h"
38
38
 
39
39
  #include <math.h>
40
40
  #include <ruby/vm.h>
@@ -46,18 +46,19 @@
46
46
  #include "rb_call_credentials.h"
47
47
  #include "rb_channel.h"
48
48
  #include "rb_channel_credentials.h"
49
+ #include "rb_compression_options.h"
50
+ #include "rb_event_thread.h"
49
51
  #include "rb_loader.h"
50
52
  #include "rb_server.h"
51
53
  #include "rb_server_credentials.h"
52
- #include "rb_compression_options.h"
53
- #include "rb_event_thread.h"
54
- #include "rb_channel.h"
55
54
 
56
55
  static VALUE grpc_rb_cTimeVal = Qnil;
57
56
 
58
57
  static rb_data_type_t grpc_rb_timespec_data_type = {
59
58
  "gpr_timespec",
60
- {GRPC_RB_GC_NOT_MARKED, GRPC_RB_GC_DONT_FREE, GRPC_RB_MEMSIZE_UNAVAILABLE,
59
+ {GRPC_RB_GC_NOT_MARKED,
60
+ GRPC_RB_GC_DONT_FREE,
61
+ GRPC_RB_MEMSIZE_UNAVAILABLE,
61
62
  {NULL, NULL}},
62
63
  NULL,
63
64
  NULL,
@@ -86,8 +87,7 @@ VALUE grpc_rb_cannot_init(VALUE self) {
86
87
  /* Init/Clone func that fails by raising an exception. */
87
88
  VALUE grpc_rb_cannot_init_copy(VALUE copy, VALUE self) {
88
89
  (void)self;
89
- rb_raise(rb_eTypeError,
90
- "Copy initialization of %s is not supported",
90
+ rb_raise(rb_eTypeError, "Copy initialization of %s is not supported",
91
91
  rb_obj_classname(copy));
92
92
  return Qnil;
93
93
  }
@@ -145,8 +145,7 @@ gpr_timespec grpc_rb_time_timeval(VALUE time, int interval) {
145
145
  }
146
146
  t.tv_sec = (int64_t)f;
147
147
  if (f != t.tv_sec) {
148
- rb_raise(rb_eRangeError, "%f out of Time range",
149
- RFLOAT_VALUE(time));
148
+ rb_raise(rb_eRangeError, "%f out of Time range", RFLOAT_VALUE(time));
150
149
  }
151
150
  t.tv_nsec = (int)(d * 1e9 + 0.5);
152
151
  }
@@ -271,9 +270,7 @@ static void Init_grpc_time_consts() {
271
270
  id_tv_nsec = rb_intern("tv_nsec");
272
271
  }
273
272
 
274
- static void grpc_rb_shutdown(void) {
275
- grpc_shutdown();
276
- }
273
+ static void grpc_rb_shutdown(void) { grpc_shutdown(); }
277
274
 
278
275
  /* Initialize the GRPC module structs */
279
276
 
@@ -322,9 +319,8 @@ void Init_grpc_c() {
322
319
 
323
320
  grpc_rb_mGRPC = rb_define_module("GRPC");
324
321
  grpc_rb_mGrpcCore = rb_define_module_under(grpc_rb_mGRPC, "Core");
325
- grpc_rb_sNewServerRpc =
326
- rb_struct_define("NewServerRpc", "method", "host",
327
- "deadline", "metadata", "call", NULL);
322
+ grpc_rb_sNewServerRpc = rb_struct_define(
323
+ "NewServerRpc", "method", "host", "deadline", "metadata", "call", NULL);
328
324
  grpc_rb_sStatus =
329
325
  rb_struct_define("Status", "code", "details", "metadata", NULL);
330
326
  sym_code = ID2SYM(rb_intern("code"));
@@ -34,8 +34,8 @@
34
34
  #ifndef GRPC_RB_H_
35
35
  #define GRPC_RB_H_
36
36
 
37
- #include <sys/time.h>
38
37
  #include <ruby/ruby.h>
38
+ #include <sys/time.h>
39
39
 
40
40
  #include <grpc/support/time.h>
41
41
 
@@ -68,7 +68,7 @@ extern VALUE sym_metadata;
68
68
 
69
69
  /* GRPC_RB_MEMSIZE_UNAVAILABLE is used in rb_data_type_t to indicate that the
70
70
  * number of bytes used by the wrapped struct is not available. */
71
- #define GRPC_RB_MEMSIZE_UNAVAILABLE (size_t (*)(const void*))(NULL)
71
+ #define GRPC_RB_MEMSIZE_UNAVAILABLE (size_t(*)(const void*))(NULL)
72
72
 
73
73
  /* A ruby object alloc func that fails by raising an exception. */
74
74
  VALUE grpc_rb_cannot_alloc(VALUE cls);
@@ -108,9 +108,9 @@ grpc_channel_create_call_type grpc_channel_create_call_import;
108
108
  grpc_channel_ping_type grpc_channel_ping_import;
109
109
  grpc_channel_register_call_type grpc_channel_register_call_import;
110
110
  grpc_channel_create_registered_call_type grpc_channel_create_registered_call_import;
111
+ grpc_call_arena_alloc_type grpc_call_arena_alloc_import;
111
112
  grpc_call_start_batch_type grpc_call_start_batch_import;
112
113
  grpc_call_get_peer_type grpc_call_get_peer_import;
113
- grpc_call_set_load_reporting_cost_context_type grpc_call_set_load_reporting_cost_context_import;
114
114
  grpc_census_call_set_context_type grpc_census_call_set_context_import;
115
115
  grpc_census_call_get_context_type grpc_census_call_get_context_import;
116
116
  grpc_channel_get_target_type grpc_channel_get_target_import;
@@ -120,13 +120,13 @@ grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import;
120
120
  grpc_channel_destroy_type grpc_channel_destroy_import;
121
121
  grpc_call_cancel_type grpc_call_cancel_import;
122
122
  grpc_call_cancel_with_status_type grpc_call_cancel_with_status_import;
123
- grpc_call_destroy_type grpc_call_destroy_import;
123
+ grpc_call_ref_type grpc_call_ref_import;
124
+ grpc_call_unref_type grpc_call_unref_import;
124
125
  grpc_server_request_call_type grpc_server_request_call_import;
125
126
  grpc_server_register_method_type grpc_server_register_method_import;
126
127
  grpc_server_request_registered_call_type grpc_server_request_registered_call_import;
127
128
  grpc_server_create_type grpc_server_create_import;
128
129
  grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import;
129
- grpc_server_register_non_listening_completion_queue_type grpc_server_register_non_listening_completion_queue_import;
130
130
  grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import;
131
131
  grpc_server_start_type grpc_server_start_import;
132
132
  grpc_server_shutdown_and_notify_type grpc_server_shutdown_and_notify_import;
@@ -179,10 +179,12 @@ grpc_call_set_credentials_type grpc_call_set_credentials_import;
179
179
  grpc_server_credentials_set_auth_metadata_processor_type grpc_server_credentials_set_auth_metadata_processor_import;
180
180
  grpc_slice_ref_type grpc_slice_ref_import;
181
181
  grpc_slice_unref_type grpc_slice_unref_import;
182
+ grpc_slice_copy_type grpc_slice_copy_import;
182
183
  grpc_slice_new_type grpc_slice_new_import;
183
184
  grpc_slice_new_with_user_data_type grpc_slice_new_with_user_data_import;
184
185
  grpc_slice_new_with_len_type grpc_slice_new_with_len_import;
185
186
  grpc_slice_malloc_type grpc_slice_malloc_import;
187
+ grpc_slice_malloc_large_type grpc_slice_malloc_large_import;
186
188
  grpc_slice_intern_type grpc_slice_intern_import;
187
189
  grpc_slice_from_copied_string_type grpc_slice_from_copied_string_import;
188
190
  grpc_slice_from_copied_buffer_type grpc_slice_from_copied_buffer_import;
@@ -191,6 +193,7 @@ grpc_slice_from_static_buffer_type grpc_slice_from_static_buffer_import;
191
193
  grpc_slice_sub_type grpc_slice_sub_import;
192
194
  grpc_slice_sub_no_ref_type grpc_slice_sub_no_ref_import;
193
195
  grpc_slice_split_tail_type grpc_slice_split_tail_import;
196
+ grpc_slice_split_tail_maybe_ref_type grpc_slice_split_tail_maybe_ref_import;
194
197
  grpc_slice_split_head_type grpc_slice_split_head_import;
195
198
  grpc_empty_slice_type grpc_empty_slice_import;
196
199
  grpc_slice_default_hash_impl_type grpc_slice_default_hash_impl_import;
@@ -219,6 +222,7 @@ grpc_slice_buffer_swap_type grpc_slice_buffer_swap_import;
219
222
  grpc_slice_buffer_move_into_type grpc_slice_buffer_move_into_import;
220
223
  grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import;
221
224
  grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import;
225
+ grpc_slice_buffer_move_first_no_ref_type grpc_slice_buffer_move_first_no_ref_import;
222
226
  grpc_slice_buffer_move_first_into_buffer_type grpc_slice_buffer_move_first_into_buffer_import;
223
227
  grpc_slice_buffer_take_first_type grpc_slice_buffer_take_first_import;
224
228
  grpc_slice_buffer_undo_take_first_type grpc_slice_buffer_undo_take_first_import;
@@ -405,9 +409,9 @@ void grpc_rb_load_imports(HMODULE library) {
405
409
  grpc_channel_ping_import = (grpc_channel_ping_type) GetProcAddress(library, "grpc_channel_ping");
406
410
  grpc_channel_register_call_import = (grpc_channel_register_call_type) GetProcAddress(library, "grpc_channel_register_call");
407
411
  grpc_channel_create_registered_call_import = (grpc_channel_create_registered_call_type) GetProcAddress(library, "grpc_channel_create_registered_call");
412
+ grpc_call_arena_alloc_import = (grpc_call_arena_alloc_type) GetProcAddress(library, "grpc_call_arena_alloc");
408
413
  grpc_call_start_batch_import = (grpc_call_start_batch_type) GetProcAddress(library, "grpc_call_start_batch");
409
414
  grpc_call_get_peer_import = (grpc_call_get_peer_type) GetProcAddress(library, "grpc_call_get_peer");
410
- grpc_call_set_load_reporting_cost_context_import = (grpc_call_set_load_reporting_cost_context_type) GetProcAddress(library, "grpc_call_set_load_reporting_cost_context");
411
415
  grpc_census_call_set_context_import = (grpc_census_call_set_context_type) GetProcAddress(library, "grpc_census_call_set_context");
412
416
  grpc_census_call_get_context_import = (grpc_census_call_get_context_type) GetProcAddress(library, "grpc_census_call_get_context");
413
417
  grpc_channel_get_target_import = (grpc_channel_get_target_type) GetProcAddress(library, "grpc_channel_get_target");
@@ -417,13 +421,13 @@ void grpc_rb_load_imports(HMODULE library) {
417
421
  grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy");
418
422
  grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel");
419
423
  grpc_call_cancel_with_status_import = (grpc_call_cancel_with_status_type) GetProcAddress(library, "grpc_call_cancel_with_status");
420
- grpc_call_destroy_import = (grpc_call_destroy_type) GetProcAddress(library, "grpc_call_destroy");
424
+ grpc_call_ref_import = (grpc_call_ref_type) GetProcAddress(library, "grpc_call_ref");
425
+ grpc_call_unref_import = (grpc_call_unref_type) GetProcAddress(library, "grpc_call_unref");
421
426
  grpc_server_request_call_import = (grpc_server_request_call_type) GetProcAddress(library, "grpc_server_request_call");
422
427
  grpc_server_register_method_import = (grpc_server_register_method_type) GetProcAddress(library, "grpc_server_register_method");
423
428
  grpc_server_request_registered_call_import = (grpc_server_request_registered_call_type) GetProcAddress(library, "grpc_server_request_registered_call");
424
429
  grpc_server_create_import = (grpc_server_create_type) GetProcAddress(library, "grpc_server_create");
425
430
  grpc_server_register_completion_queue_import = (grpc_server_register_completion_queue_type) GetProcAddress(library, "grpc_server_register_completion_queue");
426
- grpc_server_register_non_listening_completion_queue_import = (grpc_server_register_non_listening_completion_queue_type) GetProcAddress(library, "grpc_server_register_non_listening_completion_queue");
427
431
  grpc_server_add_insecure_http2_port_import = (grpc_server_add_insecure_http2_port_type) GetProcAddress(library, "grpc_server_add_insecure_http2_port");
428
432
  grpc_server_start_import = (grpc_server_start_type) GetProcAddress(library, "grpc_server_start");
429
433
  grpc_server_shutdown_and_notify_import = (grpc_server_shutdown_and_notify_type) GetProcAddress(library, "grpc_server_shutdown_and_notify");
@@ -476,10 +480,12 @@ void grpc_rb_load_imports(HMODULE library) {
476
480
  grpc_server_credentials_set_auth_metadata_processor_import = (grpc_server_credentials_set_auth_metadata_processor_type) GetProcAddress(library, "grpc_server_credentials_set_auth_metadata_processor");
477
481
  grpc_slice_ref_import = (grpc_slice_ref_type) GetProcAddress(library, "grpc_slice_ref");
478
482
  grpc_slice_unref_import = (grpc_slice_unref_type) GetProcAddress(library, "grpc_slice_unref");
483
+ grpc_slice_copy_import = (grpc_slice_copy_type) GetProcAddress(library, "grpc_slice_copy");
479
484
  grpc_slice_new_import = (grpc_slice_new_type) GetProcAddress(library, "grpc_slice_new");
480
485
  grpc_slice_new_with_user_data_import = (grpc_slice_new_with_user_data_type) GetProcAddress(library, "grpc_slice_new_with_user_data");
481
486
  grpc_slice_new_with_len_import = (grpc_slice_new_with_len_type) GetProcAddress(library, "grpc_slice_new_with_len");
482
487
  grpc_slice_malloc_import = (grpc_slice_malloc_type) GetProcAddress(library, "grpc_slice_malloc");
488
+ grpc_slice_malloc_large_import = (grpc_slice_malloc_large_type) GetProcAddress(library, "grpc_slice_malloc_large");
483
489
  grpc_slice_intern_import = (grpc_slice_intern_type) GetProcAddress(library, "grpc_slice_intern");
484
490
  grpc_slice_from_copied_string_import = (grpc_slice_from_copied_string_type) GetProcAddress(library, "grpc_slice_from_copied_string");
485
491
  grpc_slice_from_copied_buffer_import = (grpc_slice_from_copied_buffer_type) GetProcAddress(library, "grpc_slice_from_copied_buffer");
@@ -488,6 +494,7 @@ void grpc_rb_load_imports(HMODULE library) {
488
494
  grpc_slice_sub_import = (grpc_slice_sub_type) GetProcAddress(library, "grpc_slice_sub");
489
495
  grpc_slice_sub_no_ref_import = (grpc_slice_sub_no_ref_type) GetProcAddress(library, "grpc_slice_sub_no_ref");
490
496
  grpc_slice_split_tail_import = (grpc_slice_split_tail_type) GetProcAddress(library, "grpc_slice_split_tail");
497
+ grpc_slice_split_tail_maybe_ref_import = (grpc_slice_split_tail_maybe_ref_type) GetProcAddress(library, "grpc_slice_split_tail_maybe_ref");
491
498
  grpc_slice_split_head_import = (grpc_slice_split_head_type) GetProcAddress(library, "grpc_slice_split_head");
492
499
  grpc_empty_slice_import = (grpc_empty_slice_type) GetProcAddress(library, "grpc_empty_slice");
493
500
  grpc_slice_default_hash_impl_import = (grpc_slice_default_hash_impl_type) GetProcAddress(library, "grpc_slice_default_hash_impl");
@@ -516,6 +523,7 @@ void grpc_rb_load_imports(HMODULE library) {
516
523
  grpc_slice_buffer_move_into_import = (grpc_slice_buffer_move_into_type) GetProcAddress(library, "grpc_slice_buffer_move_into");
517
524
  grpc_slice_buffer_trim_end_import = (grpc_slice_buffer_trim_end_type) GetProcAddress(library, "grpc_slice_buffer_trim_end");
518
525
  grpc_slice_buffer_move_first_import = (grpc_slice_buffer_move_first_type) GetProcAddress(library, "grpc_slice_buffer_move_first");
526
+ grpc_slice_buffer_move_first_no_ref_import = (grpc_slice_buffer_move_first_no_ref_type) GetProcAddress(library, "grpc_slice_buffer_move_first_no_ref");
519
527
  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");
520
528
  grpc_slice_buffer_take_first_import = (grpc_slice_buffer_take_first_type) GetProcAddress(library, "grpc_slice_buffer_take_first");
521
529
  grpc_slice_buffer_undo_take_first_import = (grpc_slice_buffer_undo_take_first_type) GetProcAddress(library, "grpc_slice_buffer_undo_take_first");
@@ -233,7 +233,7 @@ extern grpc_completion_queue_create_for_next_type grpc_completion_queue_create_f
233
233
  typedef grpc_completion_queue *(*grpc_completion_queue_create_for_pluck_type)(void *reserved);
234
234
  extern grpc_completion_queue_create_for_pluck_type grpc_completion_queue_create_for_pluck_import;
235
235
  #define grpc_completion_queue_create_for_pluck grpc_completion_queue_create_for_pluck_import
236
- typedef grpc_completion_queue *(*grpc_completion_queue_create_type)(void *reserved);
236
+ typedef grpc_completion_queue *(*grpc_completion_queue_create_type)(const grpc_completion_queue_factory *factory, const grpc_completion_queue_attributes *attributes, void *reserved);
237
237
  extern grpc_completion_queue_create_type grpc_completion_queue_create_import;
238
238
  #define grpc_completion_queue_create grpc_completion_queue_create_import
239
239
  typedef grpc_event(*grpc_completion_queue_next_type)(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved);
@@ -275,15 +275,15 @@ extern grpc_channel_register_call_type grpc_channel_register_call_import;
275
275
  typedef grpc_call *(*grpc_channel_create_registered_call_type)(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, void *registered_call_handle, gpr_timespec deadline, void *reserved);
276
276
  extern grpc_channel_create_registered_call_type grpc_channel_create_registered_call_import;
277
277
  #define grpc_channel_create_registered_call grpc_channel_create_registered_call_import
278
+ typedef void *(*grpc_call_arena_alloc_type)(grpc_call *call, size_t size);
279
+ extern grpc_call_arena_alloc_type grpc_call_arena_alloc_import;
280
+ #define grpc_call_arena_alloc grpc_call_arena_alloc_import
278
281
  typedef grpc_call_error(*grpc_call_start_batch_type)(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved);
279
282
  extern grpc_call_start_batch_type grpc_call_start_batch_import;
280
283
  #define grpc_call_start_batch grpc_call_start_batch_import
281
284
  typedef char *(*grpc_call_get_peer_type)(grpc_call *call);
282
285
  extern grpc_call_get_peer_type grpc_call_get_peer_import;
283
286
  #define grpc_call_get_peer grpc_call_get_peer_import
284
- typedef void(*grpc_call_set_load_reporting_cost_context_type)(grpc_call *call, struct grpc_load_reporting_cost_context *context);
285
- extern grpc_call_set_load_reporting_cost_context_type grpc_call_set_load_reporting_cost_context_import;
286
- #define grpc_call_set_load_reporting_cost_context grpc_call_set_load_reporting_cost_context_import
287
287
  typedef void(*grpc_census_call_set_context_type)(grpc_call *call, struct census_context *context);
288
288
  extern grpc_census_call_set_context_type grpc_census_call_set_context_import;
289
289
  #define grpc_census_call_set_context grpc_census_call_set_context_import
@@ -311,9 +311,12 @@ extern grpc_call_cancel_type grpc_call_cancel_import;
311
311
  typedef grpc_call_error(*grpc_call_cancel_with_status_type)(grpc_call *call, grpc_status_code status, const char *description, void *reserved);
312
312
  extern grpc_call_cancel_with_status_type grpc_call_cancel_with_status_import;
313
313
  #define grpc_call_cancel_with_status grpc_call_cancel_with_status_import
314
- typedef void(*grpc_call_destroy_type)(grpc_call *call);
315
- extern grpc_call_destroy_type grpc_call_destroy_import;
316
- #define grpc_call_destroy grpc_call_destroy_import
314
+ typedef void(*grpc_call_ref_type)(grpc_call *call);
315
+ extern grpc_call_ref_type grpc_call_ref_import;
316
+ #define grpc_call_ref grpc_call_ref_import
317
+ typedef void(*grpc_call_unref_type)(grpc_call *call);
318
+ extern grpc_call_unref_type grpc_call_unref_import;
319
+ #define grpc_call_unref grpc_call_unref_import
317
320
  typedef grpc_call_error(*grpc_server_request_call_type)(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new);
318
321
  extern grpc_server_request_call_type grpc_server_request_call_import;
319
322
  #define grpc_server_request_call grpc_server_request_call_import
@@ -329,9 +332,6 @@ extern grpc_server_create_type grpc_server_create_import;
329
332
  typedef void(*grpc_server_register_completion_queue_type)(grpc_server *server, grpc_completion_queue *cq, void *reserved);
330
333
  extern grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import;
331
334
  #define grpc_server_register_completion_queue grpc_server_register_completion_queue_import
332
- typedef void(*grpc_server_register_non_listening_completion_queue_type)(grpc_server *server, grpc_completion_queue *q, void *reserved);
333
- extern grpc_server_register_non_listening_completion_queue_type grpc_server_register_non_listening_completion_queue_import;
334
- #define grpc_server_register_non_listening_completion_queue grpc_server_register_non_listening_completion_queue_import
335
335
  typedef int(*grpc_server_add_insecure_http2_port_type)(grpc_server *server, const char *addr);
336
336
  extern grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import;
337
337
  #define grpc_server_add_insecure_http2_port grpc_server_add_insecure_http2_port_import
@@ -488,6 +488,9 @@ extern grpc_slice_ref_type grpc_slice_ref_import;
488
488
  typedef void(*grpc_slice_unref_type)(grpc_slice s);
489
489
  extern grpc_slice_unref_type grpc_slice_unref_import;
490
490
  #define grpc_slice_unref grpc_slice_unref_import
491
+ typedef grpc_slice(*grpc_slice_copy_type)(grpc_slice s);
492
+ extern grpc_slice_copy_type grpc_slice_copy_import;
493
+ #define grpc_slice_copy grpc_slice_copy_import
491
494
  typedef grpc_slice(*grpc_slice_new_type)(void *p, size_t len, void (*destroy)(void *));
492
495
  extern grpc_slice_new_type grpc_slice_new_import;
493
496
  #define grpc_slice_new grpc_slice_new_import
@@ -500,6 +503,9 @@ extern grpc_slice_new_with_len_type grpc_slice_new_with_len_import;
500
503
  typedef grpc_slice(*grpc_slice_malloc_type)(size_t length);
501
504
  extern grpc_slice_malloc_type grpc_slice_malloc_import;
502
505
  #define grpc_slice_malloc grpc_slice_malloc_import
506
+ typedef grpc_slice(*grpc_slice_malloc_large_type)(size_t length);
507
+ extern grpc_slice_malloc_large_type grpc_slice_malloc_large_import;
508
+ #define grpc_slice_malloc_large grpc_slice_malloc_large_import
503
509
  typedef grpc_slice(*grpc_slice_intern_type)(grpc_slice slice);
504
510
  extern grpc_slice_intern_type grpc_slice_intern_import;
505
511
  #define grpc_slice_intern grpc_slice_intern_import
@@ -524,6 +530,9 @@ extern grpc_slice_sub_no_ref_type grpc_slice_sub_no_ref_import;
524
530
  typedef grpc_slice(*grpc_slice_split_tail_type)(grpc_slice *s, size_t split);
525
531
  extern grpc_slice_split_tail_type grpc_slice_split_tail_import;
526
532
  #define grpc_slice_split_tail grpc_slice_split_tail_import
533
+ typedef grpc_slice(*grpc_slice_split_tail_maybe_ref_type)(grpc_slice *s, size_t split, grpc_slice_ref_whom ref_whom);
534
+ extern grpc_slice_split_tail_maybe_ref_type grpc_slice_split_tail_maybe_ref_import;
535
+ #define grpc_slice_split_tail_maybe_ref grpc_slice_split_tail_maybe_ref_import
527
536
  typedef grpc_slice(*grpc_slice_split_head_type)(grpc_slice *s, size_t split);
528
537
  extern grpc_slice_split_head_type grpc_slice_split_head_import;
529
538
  #define grpc_slice_split_head grpc_slice_split_head_import
@@ -608,6 +617,9 @@ extern grpc_slice_buffer_trim_end_type grpc_slice_buffer_trim_end_import;
608
617
  typedef void(*grpc_slice_buffer_move_first_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst);
609
618
  extern grpc_slice_buffer_move_first_type grpc_slice_buffer_move_first_import;
610
619
  #define grpc_slice_buffer_move_first grpc_slice_buffer_move_first_import
620
+ typedef void(*grpc_slice_buffer_move_first_no_ref_type)(grpc_slice_buffer *src, size_t n, grpc_slice_buffer *dst);
621
+ extern grpc_slice_buffer_move_first_no_ref_type grpc_slice_buffer_move_first_no_ref_import;
622
+ #define grpc_slice_buffer_move_first_no_ref grpc_slice_buffer_move_first_no_ref_import
611
623
  typedef void(*grpc_slice_buffer_move_first_into_buffer_type)(grpc_exec_ctx *exec_ctx, grpc_slice_buffer *src, size_t n, void *dst);
612
624
  extern grpc_slice_buffer_move_first_into_buffer_type grpc_slice_buffer_move_first_into_buffer_import;
613
625
  #define grpc_slice_buffer_move_first_into_buffer grpc_slice_buffer_move_first_into_buffer_import