impl_2codegen_2slice_8h_source.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.13"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC Core: include/grpc/impl/codegen/slice.h Source File</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">GRPC Core
  25. &#160;<span id="projectnumber">6.0.0-dev</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.13 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <script type="text/javascript" src="menudata.js"></script>
  38. <script type="text/javascript" src="menu.js"></script>
  39. <script type="text/javascript">
  40. $(function() {
  41. initMenu('',true,false,'search.php','Search');
  42. $(document).ready(function() { init_search(); });
  43. });
  44. </script>
  45. <div id="main-nav"></div>
  46. <!-- window showing the filter options -->
  47. <div id="MSearchSelectWindow"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. onkeydown="return searchBox.OnSearchSelectKey(event)">
  51. </div>
  52. <!-- iframe showing the search results (closed by default) -->
  53. <div id="MSearchResultsWindow">
  54. <iframe src="javascript:void(0)" frameborder="0"
  55. name="MSearchResults" id="MSearchResults">
  56. </iframe>
  57. </div>
  58. <div id="nav-path" class="navpath">
  59. <ul>
  60. <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_9d7a14d6d9adcbe4c35dbdb88d867e2e.html">grpc</a></li><li class="navelem"><a class="el" href="dir_4b3e2ed696753daba329e2683e0f6479.html">impl</a></li><li class="navelem"><a class="el" href="dir_7a167954ab48275cc692d783196d1f28.html">codegen</a></li> </ul>
  61. </div>
  62. </div><!-- top -->
  63. <div class="header">
  64. <div class="headertitle">
  65. <div class="title">slice.h</div> </div>
  66. </div><!--header-->
  67. <div class="contents">
  68. <a href="impl_2codegen_2slice_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * Copyright 2015 gRPC authors.</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * you may not use this file except in compliance with the License.</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * You may obtain a copy of the License at</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * limitations under the License.</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#ifndef GRPC_IMPL_CODEGEN_SLICE_H</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#define GRPC_IMPL_CODEGEN_SLICE_H</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="impl_2codegen_2port__platform_8h.html">grpc/impl/codegen/port_platform.h</a>&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="gpr__slice_8h.html">grpc/impl/codegen/gpr_slice.h</a>&gt;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a2a5f8eaa5d8784bfec46ac983644dca2"> 28</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__slice.html">grpc_slice</a> <a class="code" href="structgrpc__slice.html">grpc_slice</a>;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html"> 43</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__slice__refcount__vtable.html">grpc_slice_refcount_vtable</a> {</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html#ac32e1fb1e52cc844f59e8ab78afff853"> 44</a></span>&#160; void (*<a class="code" href="structgrpc__slice__refcount__vtable.html#ac32e1fb1e52cc844f59e8ab78afff853">ref</a>)(<span class="keywordtype">void</span>*);</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html#aff300ff56298de4fd0d497ac005692ad"> 45</a></span>&#160; void (*<a class="code" href="structgrpc__slice__refcount__vtable.html#aff300ff56298de4fd0d497ac005692ad">unref</a>)(<span class="keywordtype">void</span>*);</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html#a2a90794c3e3ead5ee4cbe2b492d1788c"> 46</a></span>&#160; int (*<a class="code" href="structgrpc__slice__refcount__vtable.html#a2a90794c3e3ead5ee4cbe2b492d1788c">eq</a>)(<a class="code" href="structgrpc__slice.html">grpc_slice</a> a, <a class="code" href="structgrpc__slice.html">grpc_slice</a> b);</div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount__vtable.html#a497f51ccb0631966ae530a8e18737da2"> 47</a></span>&#160; uint32_t (*<a class="code" href="structgrpc__slice__refcount__vtable.html#a497f51ccb0631966ae530a8e18737da2">hash</a>)(<a class="code" href="structgrpc__slice.html">grpc_slice</a> slice);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;} <a class="code" href="impl_2codegen_2slice_8h.html#a0ba9a84b74d6308678a2f53212b5b3fd">grpc_slice_refcount_vtable</a>;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount.html"> 55</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__slice__refcount.html">grpc_slice_refcount</a> {</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount.html#ab35b82d586e9ca84f9d42af591616f98"> 56</a></span>&#160; <span class="keyword">const</span> <a class="code" href="structgrpc__slice__refcount__vtable.html">grpc_slice_refcount_vtable</a>* <a class="code" href="structgrpc__slice__refcount.html#ab35b82d586e9ca84f9d42af591616f98">vtable</a>;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structgrpc__slice__refcount.html#a113ae62eac88e4180feb9ecc80e0f2f9"> 61</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structgrpc__slice__refcount.html">grpc_slice_refcount</a>* <a class="code" href="structgrpc__slice__refcount.html#a113ae62eac88e4180feb9ecc80e0f2f9">sub_refcount</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;} <a class="code" href="impl_2codegen_2slice_8h.html#acb7fc89ea8343fde6d0c09f1ea70dbc4">grpc_slice_refcount</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="comment">/* Inlined half of grpc_slice is allowed to expand the size of the overall type</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="comment"> by this many bytes */</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a6a30245ea694a3915b1413a2f50c9b54"> 66</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_INLINE_EXTRA_SIZE sizeof(void*)</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#ae65fc74cb3afbcd3299a1c93f90bae20"> 68</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_INLINED_SIZE \</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor"> (sizeof(size_t) + sizeof(uint8_t*) - 1 + GRPC_SLICE_INLINE_EXTRA_SIZE)</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structgrpc__slice.html"> 80</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structgrpc__slice.html">grpc_slice</a> {</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="structgrpc__slice.html#a467ef319d024f1897c7ff3bdadb78493"> 81</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structgrpc__slice__refcount.html">grpc_slice_refcount</a>* <a class="code" href="structgrpc__slice.html#a467ef319d024f1897c7ff3bdadb78493">refcount</a>;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="uniongrpc__slice_1_1grpc__slice__data.html"> 82</a></span>&#160; <span class="keyword">union </span><a class="code" href="uniongrpc__slice_1_1grpc__slice__data.html">grpc_slice_data</a> {</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html"> 83</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html">grpc_slice_refcounted</a> {</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html#abeb23ef5c6395ccd04908b9d7227a566"> 84</a></span>&#160; uint8_t* <a class="code" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html#abeb23ef5c6395ccd04908b9d7227a566">bytes</a>;</div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html#abb0e321a6dfc5609ce4a7eb940484ee0"> 85</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html#abb0e321a6dfc5609ce4a7eb940484ee0">length</a>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; } refcounted;</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined.html"> 87</a></span>&#160; <span class="keyword">struct </span><a class="code" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined.html">grpc_slice_inlined</a> {</div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined.html#a252a85cb15f1793625ef88b1fa4f9f89"> 88</a></span>&#160; uint8_t <a class="code" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined.html#a252a85cb15f1793625ef88b1fa4f9f89">length</a>;</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined.html#ae4d2db52d28392a565aae5d5ba698c28"> 89</a></span>&#160; uint8_t bytes[<a class="code" href="impl_2codegen_2slice_8h.html#ae65fc74cb3afbcd3299a1c93f90bae20">GRPC_SLICE_INLINED_SIZE</a>];</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; } inlined;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; } data;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;};</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a81db47a2be0a079aa797cd77f3864809"> 94</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html"> 98</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structgrpc__slice__buffer.html">grpc_slice_buffer</a> {</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#a52a8e83b31006d685d98ce4db16520d8"> 101</a></span>&#160; <a class="code" href="structgrpc__slice.html">grpc_slice</a>* <a class="code" href="structgrpc__slice__buffer.html#a52a8e83b31006d685d98ce4db16520d8">base_slices</a>;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#ac37e9d19ec31eab8f429d2b4af908256"> 104</a></span>&#160; <a class="code" href="structgrpc__slice.html">grpc_slice</a>* <a class="code" href="structgrpc__slice__buffer.html#ac37e9d19ec31eab8f429d2b4af908256">slices</a>;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#ac6b9b99f100ac02280fe6ba0edc754cc"> 106</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__slice__buffer.html#ac6b9b99f100ac02280fe6ba0edc754cc">count</a>;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#a8f35fa07c9a4d9f9a4e088a1155e5833"> 109</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__slice__buffer.html#a8f35fa07c9a4d9f9a4e088a1155e5833">capacity</a>;</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#ad796dcdd16fbb680a7a5368228d20127"> 111</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="structgrpc__slice__buffer.html#ad796dcdd16fbb680a7a5368228d20127">length</a>;</div><div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="structgrpc__slice__buffer.html#a27c76a4e972a41ab5ac6504c4426fab9"> 113</a></span>&#160; <a class="code" href="structgrpc__slice.html">grpc_slice</a> inlined[<a class="code" href="impl_2codegen_2slice_8h.html#a81db47a2be0a079aa797cd77f3864809">GRPC_SLICE_BUFFER_INLINE_ELEMENTS</a>];</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;} <a class="code" href="impl_2codegen_2slice_8h.html#a96ab1e43093bbd3fa178ae2e819863e4">grpc_slice_buffer</a>;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a8a15783c251cdeb18c3f8b0ad41d0352"> 116</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_START_PTR(slice) \</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;<span class="preprocessor"> ((slice).refcount ? (slice).data.refcounted.bytes \</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="preprocessor"> : (slice).data.inlined.bytes)</span></div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#ae965fb2ee1a646253cdbd49d82b0b6c5"> 119</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_LENGTH(slice) \</span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;<span class="preprocessor"> ((slice).refcount ? (slice).data.refcounted.length \</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;<span class="preprocessor"> : (slice).data.inlined.length)</span></div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a6791fa7be0a1a9144e005cfea7baea84"> 122</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_SET_LENGTH(slice, newlen) \</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;<span class="preprocessor"> ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \</span></div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<span class="preprocessor"> : ((slice).data.inlined.length = (uint8_t)(newlen)))</span></div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a96535019e10a540192c1f276ec049a56"> 125</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_END_PTR(slice) \</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="preprocessor"> GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice)</span></div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="impl_2codegen_2slice_8h.html#a829178b3baec8b96a992a5607ad3ed93"> 127</a></span>&#160;<span class="preprocessor">#define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0)</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="preprocessor">#ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="comment">/* Duplicate GPR_* definitions */</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;<span class="preprocessor">#define GPR_SLICE_START_PTR(slice) \</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="preprocessor"> ((slice).refcount ? (slice).data.refcounted.bytes \</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="preprocessor"> : (slice).data.inlined.bytes)</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="preprocessor">#define GPR_SLICE_LENGTH(slice) \</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="preprocessor"> ((slice).refcount ? (slice).data.refcounted.length \</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="preprocessor"> : (slice).data.inlined.length)</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="preprocessor">#define GPR_SLICE_SET_LENGTH(slice, newlen) \</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;<span class="preprocessor"> ((slice).refcount ? ((slice).data.refcounted.length = (size_t)(newlen)) \</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;<span class="preprocessor"> : ((slice).data.inlined.length = (uint8_t)(newlen)))</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="preprocessor">#define GPR_SLICE_END_PTR(slice) \</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;<span class="preprocessor"> GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice)</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="preprocessor">#define GPR_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0)</span></div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */</span><span class="preprocessor"></span></div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* GRPC_IMPL_CODEGEN_SLICE_H */</span><span class="preprocessor"></span></div><div class="ttc" id="impl_2codegen_2slice_8h_html_a0ba9a84b74d6308678a2f53212b5b3fd"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#a0ba9a84b74d6308678a2f53212b5b3fd">grpc_slice_refcount_vtable</a></div><div class="ttdeci">struct grpc_slice_refcount_vtable grpc_slice_refcount_vtable</div><div class="ttdoc">Slice API. </div></div>
  69. <div class="ttc" id="structgrpc__slice__refcount_html"><div class="ttname"><a href="structgrpc__slice__refcount.html">grpc_slice_refcount</a></div><div class="ttdoc">Reference count container for grpc_slice. </div><div class="ttdef"><b>Definition:</b> slice.h:55</div></div>
  70. <div class="ttc" id="structgrpc__slice__refcount_html_a113ae62eac88e4180feb9ecc80e0f2f9"><div class="ttname"><a href="structgrpc__slice__refcount.html#a113ae62eac88e4180feb9ecc80e0f2f9">grpc_slice_refcount::sub_refcount</a></div><div class="ttdeci">struct grpc_slice_refcount * sub_refcount</div><div class="ttdoc">If a subset of this slice is taken, use this pointer for the refcount. </div><div class="ttdef"><b>Definition:</b> slice.h:61</div></div>
  71. <div class="ttc" id="structgrpc__slice_html"><div class="ttname"><a href="structgrpc__slice.html">grpc_slice</a></div><div class="ttdoc">A grpc_slice s, if initialized, represents the byte range s.bytes[0..s.length-1]. ...</div><div class="ttdef"><b>Definition:</b> slice.h:80</div></div>
  72. <div class="ttc" id="structgrpc__slice__refcount__vtable_html_a497f51ccb0631966ae530a8e18737da2"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html#a497f51ccb0631966ae530a8e18737da2">grpc_slice_refcount_vtable::hash</a></div><div class="ttdeci">uint32_t(* hash)(grpc_slice slice)</div><div class="ttdef"><b>Definition:</b> slice.h:47</div></div>
  73. <div class="ttc" id="structgrpc__slice__refcount__vtable_html_ac32e1fb1e52cc844f59e8ab78afff853"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html#ac32e1fb1e52cc844f59e8ab78afff853">grpc_slice_refcount_vtable::ref</a></div><div class="ttdeci">void(* ref)(void *)</div><div class="ttdef"><b>Definition:</b> slice.h:44</div></div>
  74. <div class="ttc" id="structgrpc__slice__buffer_html_ac37e9d19ec31eab8f429d2b4af908256"><div class="ttname"><a href="structgrpc__slice__buffer.html#ac37e9d19ec31eab8f429d2b4af908256">grpc_slice_buffer::slices</a></div><div class="ttdeci">grpc_slice * slices</div><div class="ttdoc">slices in the array (Points to the first valid grpc_slice in the array) </div><div class="ttdef"><b>Definition:</b> slice.h:104</div></div>
  75. <div class="ttc" id="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined_html"><div class="ttname"><a href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined.html">grpc_slice::grpc_slice_data::grpc_slice_inlined</a></div><div class="ttdef"><b>Definition:</b> slice.h:87</div></div>
  76. <div class="ttc" id="structgrpc__slice__buffer_html"><div class="ttname"><a href="structgrpc__slice__buffer.html">grpc_slice_buffer</a></div><div class="ttdoc">Represents an expandable array of slices, to be interpreted as a single item. </div><div class="ttdef"><b>Definition:</b> slice.h:98</div></div>
  77. <div class="ttc" id="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined_html_a252a85cb15f1793625ef88b1fa4f9f89"><div class="ttname"><a href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__inlined.html#a252a85cb15f1793625ef88b1fa4f9f89">grpc_slice::grpc_slice_data::grpc_slice_inlined::length</a></div><div class="ttdeci">uint8_t length</div><div class="ttdef"><b>Definition:</b> slice.h:88</div></div>
  78. <div class="ttc" id="structgrpc__slice__refcount__vtable_html_aff300ff56298de4fd0d497ac005692ad"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html#aff300ff56298de4fd0d497ac005692ad">grpc_slice_refcount_vtable::unref</a></div><div class="ttdeci">void(* unref)(void *)</div><div class="ttdef"><b>Definition:</b> slice.h:45</div></div>
  79. <div class="ttc" id="structgrpc__slice__refcount__vtable_html_a2a90794c3e3ead5ee4cbe2b492d1788c"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html#a2a90794c3e3ead5ee4cbe2b492d1788c">grpc_slice_refcount_vtable::eq</a></div><div class="ttdeci">int(* eq)(grpc_slice a, grpc_slice b)</div><div class="ttdef"><b>Definition:</b> slice.h:46</div></div>
  80. <div class="ttc" id="structgrpc__slice__refcount__vtable_html"><div class="ttname"><a href="structgrpc__slice__refcount__vtable.html">grpc_slice_refcount_vtable</a></div><div class="ttdoc">Slice API. </div><div class="ttdef"><b>Definition:</b> slice.h:43</div></div>
  81. <div class="ttc" id="structgrpc__slice__buffer_html_ad796dcdd16fbb680a7a5368228d20127"><div class="ttname"><a href="structgrpc__slice__buffer.html#ad796dcdd16fbb680a7a5368228d20127">grpc_slice_buffer::length</a></div><div class="ttdeci">size_t length</div><div class="ttdoc">the combined length of all slices in the array </div><div class="ttdef"><b>Definition:</b> slice.h:111</div></div>
  82. <div class="ttc" id="structgrpc__slice_html_a467ef319d024f1897c7ff3bdadb78493"><div class="ttname"><a href="structgrpc__slice.html#a467ef319d024f1897c7ff3bdadb78493">grpc_slice::refcount</a></div><div class="ttdeci">struct grpc_slice_refcount * refcount</div><div class="ttdef"><b>Definition:</b> slice.h:81</div></div>
  83. <div class="ttc" id="structgrpc__slice__buffer_html_a52a8e83b31006d685d98ce4db16520d8"><div class="ttname"><a href="structgrpc__slice__buffer.html#a52a8e83b31006d685d98ce4db16520d8">grpc_slice_buffer::base_slices</a></div><div class="ttdeci">grpc_slice * base_slices</div><div class="ttdoc">This is for internal use only. </div><div class="ttdef"><b>Definition:</b> slice.h:101</div></div>
  84. <div class="ttc" id="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted_html_abb0e321a6dfc5609ce4a7eb940484ee0"><div class="ttname"><a href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html#abb0e321a6dfc5609ce4a7eb940484ee0">grpc_slice::grpc_slice_data::grpc_slice_refcounted::length</a></div><div class="ttdeci">size_t length</div><div class="ttdef"><b>Definition:</b> slice.h:85</div></div>
  85. <div class="ttc" id="structgrpc__slice__buffer_html_a8f35fa07c9a4d9f9a4e088a1155e5833"><div class="ttname"><a href="structgrpc__slice__buffer.html#a8f35fa07c9a4d9f9a4e088a1155e5833">grpc_slice_buffer::capacity</a></div><div class="ttdeci">size_t capacity</div><div class="ttdoc">the number of slices allocated in the array. </div><div class="ttdef"><b>Definition:</b> slice.h:109</div></div>
  86. <div class="ttc" id="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted_html"><div class="ttname"><a href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html">grpc_slice::grpc_slice_data::grpc_slice_refcounted</a></div><div class="ttdef"><b>Definition:</b> slice.h:83</div></div>
  87. <div class="ttc" id="impl_2codegen_2slice_8h_html_a81db47a2be0a079aa797cd77f3864809"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#a81db47a2be0a079aa797cd77f3864809">GRPC_SLICE_BUFFER_INLINE_ELEMENTS</a></div><div class="ttdeci">#define GRPC_SLICE_BUFFER_INLINE_ELEMENTS</div><div class="ttdef"><b>Definition:</b> slice.h:94</div></div>
  88. <div class="ttc" id="impl_2codegen_2slice_8h_html_ae65fc74cb3afbcd3299a1c93f90bae20"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#ae65fc74cb3afbcd3299a1c93f90bae20">GRPC_SLICE_INLINED_SIZE</a></div><div class="ttdeci">#define GRPC_SLICE_INLINED_SIZE</div><div class="ttdef"><b>Definition:</b> slice.h:68</div></div>
  89. <div class="ttc" id="impl_2codegen_2slice_8h_html_acb7fc89ea8343fde6d0c09f1ea70dbc4"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#acb7fc89ea8343fde6d0c09f1ea70dbc4">grpc_slice_refcount</a></div><div class="ttdeci">struct grpc_slice_refcount grpc_slice_refcount</div><div class="ttdoc">Reference count container for grpc_slice. </div></div>
  90. <div class="ttc" id="impl_2codegen_2slice_8h_html_a96ab1e43093bbd3fa178ae2e819863e4"><div class="ttname"><a href="impl_2codegen_2slice_8h.html#a96ab1e43093bbd3fa178ae2e819863e4">grpc_slice_buffer</a></div><div class="ttdeci">struct grpc_slice_buffer grpc_slice_buffer</div><div class="ttdoc">Represents an expandable array of slices, to be interpreted as a single item. </div></div>
  91. <div class="ttc" id="uniongrpc__slice_1_1grpc__slice__data_html"><div class="ttname"><a href="uniongrpc__slice_1_1grpc__slice__data.html">grpc_slice::grpc_slice_data</a></div><div class="ttdef"><b>Definition:</b> slice.h:82</div></div>
  92. <div class="ttc" id="structgrpc__slice__buffer_html_ac6b9b99f100ac02280fe6ba0edc754cc"><div class="ttname"><a href="structgrpc__slice__buffer.html#ac6b9b99f100ac02280fe6ba0edc754cc">grpc_slice_buffer::count</a></div><div class="ttdeci">size_t count</div><div class="ttdoc">the number of slices in the array </div><div class="ttdef"><b>Definition:</b> slice.h:106</div></div>
  93. <div class="ttc" id="structgrpc__slice__refcount_html_ab35b82d586e9ca84f9d42af591616f98"><div class="ttname"><a href="structgrpc__slice__refcount.html#ab35b82d586e9ca84f9d42af591616f98">grpc_slice_refcount::vtable</a></div><div class="ttdeci">const grpc_slice_refcount_vtable * vtable</div><div class="ttdef"><b>Definition:</b> slice.h:56</div></div>
  94. <div class="ttc" id="impl_2codegen_2port__platform_8h_html"><div class="ttname"><a href="impl_2codegen_2port__platform_8h.html">port_platform.h</a></div></div>
  95. <div class="ttc" id="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted_html_abeb23ef5c6395ccd04908b9d7227a566"><div class="ttname"><a href="structgrpc__slice_1_1grpc__slice__data_1_1grpc__slice__refcounted.html#abeb23ef5c6395ccd04908b9d7227a566">grpc_slice::grpc_slice_data::grpc_slice_refcounted::bytes</a></div><div class="ttdeci">uint8_t * bytes</div><div class="ttdef"><b>Definition:</b> slice.h:84</div></div>
  96. <div class="ttc" id="gpr__slice_8h_html"><div class="ttname"><a href="gpr__slice_8h.html">gpr_slice.h</a></div></div>
  97. </div><!-- fragment --></div><!-- contents -->
  98. <!-- start footer part -->
  99. <hr class="footer"/><address class="footer"><small>
  100. Generated on Thu Jun 28 2018 16:41:45 for GRPC Core by &#160;<a href="http://www.doxygen.org/index.html">
  101. <img class="footer" src="doxygen.png" alt="doxygen"/>
  102. </a> 1.8.13
  103. </small></address>
  104. </body>
  105. </html>