<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcbor: src/cbor/arrays.c Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libcbor
 <span id="projectnumber">0.5.0</span>
</div>
<div id="projectbrief">libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_cb565ba51d82ea933604984cbab6233d.html">cbor</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">arrays.c</div> </div>
</div><!--header-->
<div class="contents">
<a href="arrays_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com></span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * libcbor is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * it under the terms of the MIT license. See LICENSE for details.</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> */</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <string.h></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include "<a class="code" href="arrays_8h.html">arrays.h</a>"</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "<a class="code" href="memory__utils_8h.html">internal/memory_utils.h</a>"</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="arrays_8h.html#a4f634a9a4bc834e4ea6ac43e94d51f84"> 12</a></span> <span class="keywordtype">size_t</span> <a class="code" href="arrays_8c.html#a4f634a9a4bc834e4ea6ac43e94d51f84">cbor_array_size</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> {</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  assert(<a class="code" href="common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20">cbor_isa_array</a>(item));</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  <span class="keywordflow">return</span> item-><a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237">array_metadata</a>.<a class="code" href="struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb">end_ptr</a>;</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> }</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="arrays_8h.html#a5da97cca271f81f55809c39fad6078b0"> 18</a></span> <span class="keywordtype">size_t</span> <a class="code" href="arrays_8c.html#a5da97cca271f81f55809c39fad6078b0">cbor_array_allocated</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> * item)</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  assert(<a class="code" href="common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20">cbor_isa_array</a>(item));</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keywordflow">return</span> item-><a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237">array_metadata</a>.<a class="code" href="struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a">allocated</a>;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> }</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="arrays_8h.html#a1573139e26cf5b5acc4b0ed861291069"> 25</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> * <a class="code" href="arrays_8c.html#a1573139e26cf5b5acc4b0ed861291069">cbor_array_get</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> * item, <span class="keywordtype">size_t</span> index)</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keywordflow">return</span> <a class="code" href="common_8c.html#aa62e72f275c2f0fa604896bfed18e992">cbor_incref</a>(((<a class="code" href="structcbor__item__t.html">cbor_item_t</a> **) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>)[index]);</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> }</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="arrays_8h.html#a382cc2dc480ebb9c7951eb3235be89b4"> 30</a></span> <span class="keywordtype">bool</span> <a class="code" href="arrays_8c.html#a382cc2dc480ebb9c7951eb3235be89b4">cbor_array_set</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> * item, <span class="keywordtype">size_t</span> index, <a class="code" href="structcbor__item__t.html">cbor_item_t</a> * <a class="code" href="structcbor__pair.html#a44bbea9cc120de72fc4871a05dc8ec85">value</a>)</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="keywordflow">if</span> (index == item-><a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237">array_metadata</a>.<a class="code" href="struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb">end_ptr</a>) {</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">return</span> <a class="code" href="arrays_8c.html#abb1c1c9731a2195857dc471f2a6f60f5">cbor_array_push</a>(item, value);</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (index < item->metadata.array_metadata.end_ptr) {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordflow">return</span> <a class="code" href="arrays_8c.html#a44020515090bbbe91249aff0016ab8e5">cbor_array_replace</a>(item, index, value);</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> }</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="arrays_8h.html#a44020515090bbbe91249aff0016ab8e5"> 42</a></span> <span class="keywordtype">bool</span> <a class="code" href="arrays_8c.html#a44020515090bbbe91249aff0016ab8e5">cbor_array_replace</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> * item, <span class="keywordtype">size_t</span> index, <a class="code" href="structcbor__item__t.html">cbor_item_t</a> * <a class="code" href="structcbor__pair.html#a44bbea9cc120de72fc4871a05dc8ec85">value</a>)</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> {</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordflow">if</span> (index >= item-><a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237">array_metadata</a>.<a class="code" href="struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb">end_ptr</a>)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="comment">/* We cannot use cbor_array_get as that would increase the refcount */</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="common_8c.html#a4ed20937cc091bc1f481d53787fe306b">cbor_intermediate_decref</a>(((<a class="code" href="structcbor__item__t.html">cbor_item_t</a> **) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>)[index]);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  ((<a class="code" href="structcbor__item__t.html">cbor_item_t</a> **) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>)[index] = <a class="code" href="common_8c.html#aa62e72f275c2f0fa604896bfed18e992">cbor_incref</a>(value);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> }</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="arrays_8h.html#abb1c1c9731a2195857dc471f2a6f60f5"> 52</a></span> <span class="keywordtype">bool</span> <a class="code" href="arrays_8c.html#abb1c1c9731a2195857dc471f2a6f60f5">cbor_array_push</a>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *array, <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *pushee)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  assert(<a class="code" href="common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20">cbor_isa_array</a>(array));</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keyword">struct </span><a class="code" href="struct__cbor__array__metadata.html">_cbor_array_metadata</a> *metadata = (<span class="keyword">struct </span><a class="code" href="struct__cbor__array__metadata.html">_cbor_array_metadata</a> *) &array-><a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> **data = (<a class="code" href="structcbor__item__t.html">cbor_item_t</a> **) array-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">if</span> (<a class="code" href="arrays_8c.html#ac2f1480c546a0268e8b046b365e58599">cbor_array_is_definite</a>(array)) {</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="comment">/* Do not reallocate definite arrays */</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordflow">if</span> (metadata-><a class="code" href="struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb">end_ptr</a> >= metadata-><a class="code" href="struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a">allocated</a>) {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  }</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  data[metadata-><a class="code" href="struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb">end_ptr</a>++] = pushee;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="comment">/* Exponential realloc */</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">if</span> (metadata-><a class="code" href="struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb">end_ptr</a> >= metadata-><a class="code" href="struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a">allocated</a>) {</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="comment">// Check for overflows first</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">if</span> (!<a class="code" href="memory__utils_8c.html#abdee08be3f4cff35a94279fda66c4778">_cbor_safe_to_multiply</a>(CBOR_BUFFER_GROWTH, metadata-><a class="code" href="struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a">allocated</a>)) {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keywordtype">size_t</span> new_allocation = metadata-><a class="code" href="struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a">allocated</a> == 0 ? 1 : CBOR_BUFFER_GROWTH * metadata-><a class="code" href="struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a">allocated</a>;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * new_data = <a class="code" href="memory__utils_8c.html#afd7a22ccd3b44d6ff668e14c3a006e40">_cbor_realloc_multiple</a>(array-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>, <span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *), new_allocation);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">if</span> (new_data == NULL) {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  }</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  array-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a> = new_data;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  metadata-><a class="code" href="struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a">allocated</a> = new_allocation;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  }</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  ((<a class="code" href="structcbor__item__t.html">cbor_item_t</a> **)array-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>)[metadata-><a class="code" href="struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb">end_ptr</a>++] = pushee;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  }</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="common_8c.html#aa62e72f275c2f0fa604896bfed18e992">cbor_incref</a>(pushee);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> }</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="arrays_8h.html#ac2f1480c546a0268e8b046b365e58599"> 88</a></span> <span class="keywordtype">bool</span> <a class="code" href="arrays_8c.html#ac2f1480c546a0268e8b046b365e58599">cbor_array_is_definite</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  assert(<a class="code" href="common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20">cbor_isa_array</a>(item));</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">return</span> item-><a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237">array_metadata</a>.<a class="code" href="struct__cbor__array__metadata.html#a0c376239d3aafcfe64ee7c74fd422f37">type</a> == <a class="code" href="data_8h.html#a3cdab5e05cf46846e98b43cf77985589a051b0d1fe7ef7ccfc3824110b797429e">_CBOR_METADATA_DEFINITE</a>;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> }</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="arrays_8h.html#a291a9f3ff12a2e2c58b2ca8b00280d40"> 94</a></span> <span class="keywordtype">bool</span> <a class="code" href="arrays_8c.html#a291a9f3ff12a2e2c58b2ca8b00280d40">cbor_array_is_indefinite</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> {</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  assert(<a class="code" href="common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20">cbor_isa_array</a>(item));</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keywordflow">return</span> item-><a class="code" href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">metadata</a>.<a class="code" href="unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237">array_metadata</a>.<a class="code" href="struct__cbor__array__metadata.html#a0c376239d3aafcfe64ee7c74fd422f37">type</a> == <a class="code" href="data_8h.html#a3cdab5e05cf46846e98b43cf77985589ae598476995d503b404ccf78c21ab79ef">_CBOR_METADATA_INDEFINITE</a>;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="arrays_8h.html#a8dd01f4a46f162fa4f06b7df7428128e"> 100</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> **<a class="code" href="arrays_8c.html#a8dd01f4a46f162fa4f06b7df7428128e">cbor_array_handle</a>(<span class="keyword">const</span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item)</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> {</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  assert(<a class="code" href="common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20">cbor_isa_array</a>(item));</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">return</span> (<a class="code" href="structcbor__item__t.html">cbor_item_t</a> **) item-><a class="code" href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">data</a>;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> }</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="arrays_8h.html#a93d7c18019000d5e206a81a4cca70631"> 106</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="arrays_8c.html#a93d7c18019000d5e206a81a4cca70631">cbor_new_definite_array</a>(<span class="keywordtype">size_t</span> size)</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> {</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>));</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">if</span> (item == NULL) {</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">return</span> NULL;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  }</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> ** data = <a class="code" href="memory__utils_8c.html#a7bfbe0ac179b30f38bfeb9fe432ad4ec">_cbor_alloc_multiple</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a> *), size);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">if</span> (data == NULL) {</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="common_8h.html#a1300043d7db8adf6ab67f7b787f14635">_CBOR_FREE</a>(item);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">return</span> NULL;</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  }</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i = 0; i < size; i++)</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  data[i] = NULL;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  .type = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae48b04b3538ade49d7eae9ee6b656103">CBOR_TYPE_ARRAY</a>,</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  .metadata = {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  .array_metadata = {</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  .type = <a class="code" href="data_8h.html#a3cdab5e05cf46846e98b43cf77985589a051b0d1fe7ef7ccfc3824110b797429e">_CBOR_METADATA_DEFINITE</a>,</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  .allocated = size,</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  .end_ptr = 0</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  },</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  .data = (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *)data</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  };</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> }</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="arrays_8h.html#aaec916ccc6f19782b6aef5ec1da2cc26"> 138</a></span> <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *<a class="code" href="arrays_8c.html#aaec916ccc6f19782b6aef5ec1da2cc26">cbor_new_indefinite_array</a>()</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> {</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="code" href="structcbor__item__t.html">cbor_item_t</a> *item = <a class="code" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>(<span class="keyword">sizeof</span>(<a class="code" href="structcbor__item__t.html">cbor_item_t</a>));</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">if</span> (item == NULL)</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">return</span> NULL;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  *item = (<a class="code" href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a>) {</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  .<a class="code" href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">refcount</a> = 1,</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  .type = <a class="code" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae48b04b3538ade49d7eae9ee6b656103">CBOR_TYPE_ARRAY</a>,</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  .metadata = {</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  .array_metadata = {</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  .type = <a class="code" href="data_8h.html#a3cdab5e05cf46846e98b43cf77985589ae598476995d503b404ccf78c21ab79ef">_CBOR_METADATA_INDEFINITE</a>,</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  .allocated = 0,</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  .end_ptr = 0</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  }</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  },</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  .data = NULL <span class="comment">/* Can be safely realloc-ed */</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  };</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">return</span> item;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span> }</div><div class="ttc" id="data_8h_html_afdaa4bcbbdd295d719e39ce0b5519419"><div class="ttname"><a href="data_8h.html#afdaa4bcbbdd295d719e39ce0b5519419">cbor_item_t</a></div><div class="ttdeci">struct cbor_item_t cbor_item_t</div><div class="ttdoc">The item handle. </div></div>
<div class="ttc" id="struct__cbor__array__metadata_html_a388742d0b665ba1775ad89858f3049cb"><div class="ttname"><a href="struct__cbor__array__metadata.html#a388742d0b665ba1775ad89858f3049cb">_cbor_array_metadata::end_ptr</a></div><div class="ttdeci">size_t end_ptr</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00097">data.h:97</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a7d97fa5cdf027ca0499c37ec19acf843"><div class="ttname"><a href="structcbor__item__t.html#a7d97fa5cdf027ca0499c37ec19acf843">cbor_item_t::metadata</a></div><div class="ttdeci">union cbor_item_metadata metadata</div><div class="ttdoc">Discriminated by type. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00151">data.h:151</a></div></div>
<div class="ttc" id="common_8c_html_a4ed20937cc091bc1f481d53787fe306b"><div class="ttname"><a href="common_8c.html#a4ed20937cc091bc1f481d53787fe306b">cbor_intermediate_decref</a></div><div class="ttdeci">void cbor_intermediate_decref(cbor_item_t *item)</div><div class="ttdoc">Decreases the reference count by one, deallocating the item if needed. </div><div class="ttdef"><b>Definition:</b> <a href="common_8c_source.html#l00174">common.c:174</a></div></div>
<div class="ttc" id="arrays_8c_html_a44020515090bbbe91249aff0016ab8e5"><div class="ttname"><a href="arrays_8c.html#a44020515090bbbe91249aff0016ab8e5">cbor_array_replace</a></div><div class="ttdeci">bool cbor_array_replace(cbor_item_t *item, size_t index, cbor_item_t *value)</div><div class="ttdoc">Replace item at an index. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00042">arrays.c:42</a></div></div>
<div class="ttc" id="memory__utils_8c_html_afd7a22ccd3b44d6ff668e14c3a006e40"><div class="ttname"><a href="memory__utils_8c.html#afd7a22ccd3b44d6ff668e14c3a006e40">_cbor_realloc_multiple</a></div><div class="ttdeci">void * _cbor_realloc_multiple(void *pointer, size_t item_size, size_t item_count)</div><div class="ttdoc">Overflow-proof contiguous array reallocation. </div><div class="ttdef"><b>Definition:</b> <a href="memory__utils_8c_source.html#l00039">memory_utils.c:39</a></div></div>
<div class="ttc" id="structcbor__pair_html_a44bbea9cc120de72fc4871a05dc8ec85"><div class="ttname"><a href="structcbor__pair.html#a44bbea9cc120de72fc4871a05dc8ec85">cbor_pair::value</a></div><div class="ttdeci">cbor_item_t * value</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00180">data.h:180</a></div></div>
<div class="ttc" id="struct__cbor__array__metadata_html_ad59631add7d960a0777686c8cc0fd46a"><div class="ttname"><a href="struct__cbor__array__metadata.html#ad59631add7d960a0777686c8cc0fd46a">_cbor_array_metadata::allocated</a></div><div class="ttdeci">size_t allocated</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00096">data.h:96</a></div></div>
<div class="ttc" id="unioncbor__item__metadata_html_a51c4b86bb4e0313193df52d1320f9237"><div class="ttname"><a href="unioncbor__item__metadata.html#a51c4b86bb4e0313193df52d1320f9237">cbor_item_metadata::array_metadata</a></div><div class="ttdeci">struct _cbor_array_metadata array_metadata</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00142">data.h:142</a></div></div>
<div class="ttc" id="struct__cbor__array__metadata_html_a0c376239d3aafcfe64ee7c74fd422f37"><div class="ttname"><a href="struct__cbor__array__metadata.html#a0c376239d3aafcfe64ee7c74fd422f37">_cbor_array_metadata::type</a></div><div class="ttdeci">_cbor_dst_metadata type</div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00098">data.h:98</a></div></div>
<div class="ttc" id="data_8h_html_a3a931b40fc31b51cccfd1bc3dc5fc5d6ae48b04b3538ade49d7eae9ee6b656103"><div class="ttname"><a href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae48b04b3538ade49d7eae9ee6b656103">CBOR_TYPE_ARRAY</a></div><div class="ttdoc">4 - arrays </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00029">data.h:29</a></div></div>
<div class="ttc" id="memory__utils_8c_html_a7bfbe0ac179b30f38bfeb9fe432ad4ec"><div class="ttname"><a href="memory__utils_8c.html#a7bfbe0ac179b30f38bfeb9fe432ad4ec">_cbor_alloc_multiple</a></div><div class="ttdeci">void * _cbor_alloc_multiple(size_t item_size, size_t item_count)</div><div class="ttdoc">Overflow-proof contiguous array allocation. </div><div class="ttdef"><b>Definition:</b> <a href="memory__utils_8c_source.html#l00030">memory_utils.c:30</a></div></div>
<div class="ttc" id="arrays_8c_html_aaec916ccc6f19782b6aef5ec1da2cc26"><div class="ttname"><a href="arrays_8c.html#aaec916ccc6f19782b6aef5ec1da2cc26">cbor_new_indefinite_array</a></div><div class="ttdeci">cbor_item_t * cbor_new_indefinite_array()</div><div class="ttdoc">Create new indefinite array. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00138">arrays.c:138</a></div></div>
<div class="ttc" id="common_8h_html_a1300043d7db8adf6ab67f7b787f14635"><div class="ttname"><a href="common_8h.html#a1300043d7db8adf6ab67f7b787f14635">_CBOR_FREE</a></div><div class="ttdeci">#define _CBOR_FREE</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00086">common.h:86</a></div></div>
<div class="ttc" id="common_8h_html_a07a781e9212fad361b0f59f7fc921057"><div class="ttname"><a href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a></div><div class="ttdeci">#define _CBOR_MALLOC</div><div class="ttdef"><b>Definition:</b> <a href="common_8h_source.html#l00084">common.h:84</a></div></div>
<div class="ttc" id="data_8h_html_a3cdab5e05cf46846e98b43cf77985589ae598476995d503b404ccf78c21ab79ef"><div class="ttname"><a href="data_8h.html#a3cdab5e05cf46846e98b43cf77985589ae598476995d503b404ccf78c21ab79ef">_CBOR_METADATA_INDEFINITE</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00064">data.h:64</a></div></div>
<div class="ttc" id="arrays_8c_html_a382cc2dc480ebb9c7951eb3235be89b4"><div class="ttname"><a href="arrays_8c.html#a382cc2dc480ebb9c7951eb3235be89b4">cbor_array_set</a></div><div class="ttdeci">bool cbor_array_set(cbor_item_t *item, size_t index, cbor_item_t *value)</div><div class="ttdoc">Set item by index. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00030">arrays.c:30</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a6bb24fe655f086c6aa9a66d427e09cca"><div class="ttname"><a href="structcbor__item__t.html#a6bb24fe655f086c6aa9a66d427e09cca">cbor_item_t::refcount</a></div><div class="ttdeci">size_t refcount</div><div class="ttdoc">Reference count - initialize to 0. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00153">data.h:153</a></div></div>
<div class="ttc" id="arrays_8c_html_ac2f1480c546a0268e8b046b365e58599"><div class="ttname"><a href="arrays_8c.html#ac2f1480c546a0268e8b046b365e58599">cbor_array_is_definite</a></div><div class="ttdeci">bool cbor_array_is_definite(const cbor_item_t *item)</div><div class="ttdoc">Is the array definite? </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00088">arrays.c:88</a></div></div>
<div class="ttc" id="arrays_8h_html"><div class="ttname"><a href="arrays_8h.html">arrays.h</a></div></div>
<div class="ttc" id="arrays_8c_html_abb1c1c9731a2195857dc471f2a6f60f5"><div class="ttname"><a href="arrays_8c.html#abb1c1c9731a2195857dc471f2a6f60f5">cbor_array_push</a></div><div class="ttdeci">bool cbor_array_push(cbor_item_t *array, cbor_item_t *pushee)</div><div class="ttdoc">Append to the end. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00052">arrays.c:52</a></div></div>
<div class="ttc" id="arrays_8c_html_a4f634a9a4bc834e4ea6ac43e94d51f84"><div class="ttname"><a href="arrays_8c.html#a4f634a9a4bc834e4ea6ac43e94d51f84">cbor_array_size</a></div><div class="ttdeci">size_t cbor_array_size(const cbor_item_t *item)</div><div class="ttdoc">Get the number of members. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00012">arrays.c:12</a></div></div>
<div class="ttc" id="common_8c_html_aa62e72f275c2f0fa604896bfed18e992"><div class="ttname"><a href="common_8c.html#aa62e72f275c2f0fa604896bfed18e992">cbor_incref</a></div><div class="ttdeci">cbor_item_t * cbor_incref(cbor_item_t *item)</div><div class="ttdoc">Increases the reference count by one. </div><div class="ttdef"><b>Definition:</b> <a href="common_8c_source.html#l00093">common.c:93</a></div></div>
<div class="ttc" id="struct__cbor__array__metadata_html"><div class="ttname"><a href="struct__cbor__array__metadata.html">_cbor_array_metadata</a></div><div class="ttdoc">Arrays specific metadata. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00095">data.h:95</a></div></div>
<div class="ttc" id="common_8c_html_a9ed0fa96105c211867c5032f2a5a8b20"><div class="ttname"><a href="common_8c.html#a9ed0fa96105c211867c5032f2a5a8b20">cbor_isa_array</a></div><div class="ttdeci">bool cbor_isa_array(const cbor_item_t *item)</div><div class="ttdoc">Does the item have the appropriate major type? </div><div class="ttdef"><b>Definition:</b> <a href="common_8c_source.html#l00038">common.c:38</a></div></div>
<div class="ttc" id="data_8h_html_a3cdab5e05cf46846e98b43cf77985589a051b0d1fe7ef7ccfc3824110b797429e"><div class="ttname"><a href="data_8h.html#a3cdab5e05cf46846e98b43cf77985589a051b0d1fe7ef7ccfc3824110b797429e">_CBOR_METADATA_DEFINITE</a></div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00063">data.h:63</a></div></div>
<div class="ttc" id="memory__utils_8h_html"><div class="ttname"><a href="memory__utils_8h.html">memory_utils.h</a></div></div>
<div class="ttc" id="arrays_8c_html_a93d7c18019000d5e206a81a4cca70631"><div class="ttname"><a href="arrays_8c.html#a93d7c18019000d5e206a81a4cca70631">cbor_new_definite_array</a></div><div class="ttdeci">cbor_item_t * cbor_new_definite_array(size_t size)</div><div class="ttdoc">Create new definite array. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00106">arrays.c:106</a></div></div>
<div class="ttc" id="structcbor__item__t_html_a5c6dde1dbef5aad748c49786352eef44"><div class="ttname"><a href="structcbor__item__t.html#a5c6dde1dbef5aad748c49786352eef44">cbor_item_t::data</a></div><div class="ttdeci">unsigned char * data</div><div class="ttdoc">Raw data block - interpretation depends on metadata. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00157">data.h:157</a></div></div>
<div class="ttc" id="memory__utils_8c_html_abdee08be3f4cff35a94279fda66c4778"><div class="ttname"><a href="memory__utils_8c.html#abdee08be3f4cff35a94279fda66c4778">_cbor_safe_to_multiply</a></div><div class="ttdeci">bool _cbor_safe_to_multiply(size_t a, size_t b)</div><div class="ttdoc">Can a and b be multiplied without overflowing size_t? </div><div class="ttdef"><b>Definition:</b> <a href="memory__utils_8c_source.html#l00025">memory_utils.c:25</a></div></div>
<div class="ttc" id="structcbor__item__t_html"><div class="ttname"><a href="structcbor__item__t.html">cbor_item_t</a></div><div class="ttdoc">The item handle. </div><div class="ttdef"><b>Definition:</b> <a href="data_8h_source.html#l00149">data.h:149</a></div></div>
<div class="ttc" id="arrays_8c_html_a5da97cca271f81f55809c39fad6078b0"><div class="ttname"><a href="arrays_8c.html#a5da97cca271f81f55809c39fad6078b0">cbor_array_allocated</a></div><div class="ttdeci">size_t cbor_array_allocated(const cbor_item_t *item)</div><div class="ttdoc">Get the size of the allocated storage. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00018">arrays.c:18</a></div></div>
<div class="ttc" id="arrays_8c_html_a1573139e26cf5b5acc4b0ed861291069"><div class="ttname"><a href="arrays_8c.html#a1573139e26cf5b5acc4b0ed861291069">cbor_array_get</a></div><div class="ttdeci">cbor_item_t * cbor_array_get(const cbor_item_t *item, size_t index)</div><div class="ttdoc">Get item by index. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00025">arrays.c:25</a></div></div>
<div class="ttc" id="arrays_8c_html_a291a9f3ff12a2e2c58b2ca8b00280d40"><div class="ttname"><a href="arrays_8c.html#a291a9f3ff12a2e2c58b2ca8b00280d40">cbor_array_is_indefinite</a></div><div class="ttdeci">bool cbor_array_is_indefinite(const cbor_item_t *item)</div><div class="ttdoc">Is the array indefinite? </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00094">arrays.c:94</a></div></div>
<div class="ttc" id="arrays_8c_html_a8dd01f4a46f162fa4f06b7df7428128e"><div class="ttname"><a href="arrays_8c.html#a8dd01f4a46f162fa4f06b7df7428128e">cbor_array_handle</a></div><div class="ttdeci">cbor_item_t ** cbor_array_handle(const cbor_item_t *item)</div><div class="ttdoc">Get the array contents. </div><div class="ttdef"><b>Definition:</b> <a href="arrays_8c_source.html#l00100">arrays.c:100</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 6 2017 00:26:19 for libcbor by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>