<!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.h File Reference</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="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">arrays.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include "<a class="el" href="common_8h_source.html">cbor/common.h</a>"</code><br />
</div>
<p><a href="arrays_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4f634a9a4bc834e4ea6ac43e94d51f84"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a4f634a9a4bc834e4ea6ac43e94d51f84">cbor_array_size</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a4f634a9a4bc834e4ea6ac43e94d51f84"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of members. <a href="#a4f634a9a4bc834e4ea6ac43e94d51f84">More...</a><br /></td></tr>
<tr class="separator:a4f634a9a4bc834e4ea6ac43e94d51f84"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5da97cca271f81f55809c39fad6078b0"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a5da97cca271f81f55809c39fad6078b0">cbor_array_allocated</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a5da97cca271f81f55809c39fad6078b0"><td class="mdescLeft"> </td><td class="mdescRight">Get the size of the allocated storage. <a href="#a5da97cca271f81f55809c39fad6078b0">More...</a><br /></td></tr>
<tr class="separator:a5da97cca271f81f55809c39fad6078b0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1573139e26cf5b5acc4b0ed861291069"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a1573139e26cf5b5acc4b0ed861291069">cbor_array_get</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, size_t index)</td></tr>
<tr class="memdesc:a1573139e26cf5b5acc4b0ed861291069"><td class="mdescLeft"> </td><td class="mdescRight">Get item by index. <a href="#a1573139e26cf5b5acc4b0ed861291069">More...</a><br /></td></tr>
<tr class="separator:a1573139e26cf5b5acc4b0ed861291069"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a382cc2dc480ebb9c7951eb3235be89b4"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a382cc2dc480ebb9c7951eb3235be89b4">cbor_array_set</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, size_t index, <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *value)</td></tr>
<tr class="memdesc:a382cc2dc480ebb9c7951eb3235be89b4"><td class="mdescLeft"> </td><td class="mdescRight">Set item by index. <a href="#a382cc2dc480ebb9c7951eb3235be89b4">More...</a><br /></td></tr>
<tr class="separator:a382cc2dc480ebb9c7951eb3235be89b4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a44020515090bbbe91249aff0016ab8e5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a44020515090bbbe91249aff0016ab8e5">cbor_array_replace</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, size_t index, <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *value)</td></tr>
<tr class="memdesc:a44020515090bbbe91249aff0016ab8e5"><td class="mdescLeft"> </td><td class="mdescRight">Replace item at an index. <a href="#a44020515090bbbe91249aff0016ab8e5">More...</a><br /></td></tr>
<tr class="separator:a44020515090bbbe91249aff0016ab8e5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac2f1480c546a0268e8b046b365e58599"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#ac2f1480c546a0268e8b046b365e58599">cbor_array_is_definite</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:ac2f1480c546a0268e8b046b365e58599"><td class="mdescLeft"> </td><td class="mdescRight">Is the array definite? <a href="#ac2f1480c546a0268e8b046b365e58599">More...</a><br /></td></tr>
<tr class="separator:ac2f1480c546a0268e8b046b365e58599"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a291a9f3ff12a2e2c58b2ca8b00280d40"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a291a9f3ff12a2e2c58b2ca8b00280d40">cbor_array_is_indefinite</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a291a9f3ff12a2e2c58b2ca8b00280d40"><td class="mdescLeft"> </td><td class="mdescRight">Is the array indefinite? <a href="#a291a9f3ff12a2e2c58b2ca8b00280d40">More...</a><br /></td></tr>
<tr class="separator:a291a9f3ff12a2e2c58b2ca8b00280d40"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8dd01f4a46f162fa4f06b7df7428128e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> ** </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a8dd01f4a46f162fa4f06b7df7428128e">cbor_array_handle</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a8dd01f4a46f162fa4f06b7df7428128e"><td class="mdescLeft"> </td><td class="mdescRight">Get the array contents. <a href="#a8dd01f4a46f162fa4f06b7df7428128e">More...</a><br /></td></tr>
<tr class="separator:a8dd01f4a46f162fa4f06b7df7428128e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a93d7c18019000d5e206a81a4cca70631"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#a93d7c18019000d5e206a81a4cca70631">cbor_new_definite_array</a> (size_t size)</td></tr>
<tr class="memdesc:a93d7c18019000d5e206a81a4cca70631"><td class="mdescLeft"> </td><td class="mdescRight">Create new definite array. <a href="#a93d7c18019000d5e206a81a4cca70631">More...</a><br /></td></tr>
<tr class="separator:a93d7c18019000d5e206a81a4cca70631"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aaec916ccc6f19782b6aef5ec1da2cc26"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#aaec916ccc6f19782b6aef5ec1da2cc26">cbor_new_indefinite_array</a> ()</td></tr>
<tr class="memdesc:aaec916ccc6f19782b6aef5ec1da2cc26"><td class="mdescLeft"> </td><td class="mdescRight">Create new indefinite array. <a href="#aaec916ccc6f19782b6aef5ec1da2cc26">More...</a><br /></td></tr>
<tr class="separator:aaec916ccc6f19782b6aef5ec1da2cc26"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abb1c1c9731a2195857dc471f2a6f60f5"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="arrays_8h.html#abb1c1c9731a2195857dc471f2a6f60f5">cbor_array_push</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *array, <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *pushee)</td></tr>
<tr class="memdesc:abb1c1c9731a2195857dc471f2a6f60f5"><td class="mdescLeft"> </td><td class="mdescRight">Append to the end. <a href="#abb1c1c9731a2195857dc471f2a6f60f5">More...</a><br /></td></tr>
<tr class="separator:abb1c1c9731a2195857dc471f2a6f60f5"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a5da97cca271f81f55809c39fad6078b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5da97cca271f81f55809c39fad6078b0">§ </a></span>cbor_array_allocated()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_array_allocated </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the size of the allocated storage. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The size of the allocated storage (number of items) </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00018">18</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="a1573139e26cf5b5acc4b0ed861291069"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1573139e26cf5b5acc4b0ed861291069">§ </a></span>cbor_array_get()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_array_get </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>index</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get item by index. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
<tr><td class="paramname">index</td><td>The index </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><b>incref</b> The item, or <code>NULL</code> in case of boundary violation </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00025">25</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="a8dd01f4a46f162fa4f06b7df7428128e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8dd01f4a46f162fa4f06b7df7428128e">§ </a></span>cbor_array_handle()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>** cbor_array_handle </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the array contents. </p>
<p>The items may be reordered and modified as long as references remain consistent.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="arrays_8h.html#a4f634a9a4bc834e4ea6ac43e94d51f84" title="Get the number of members. ">cbor_array_size</a> items </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00100">100</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="ac2f1480c546a0268e8b046b365e58599"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2f1480c546a0268e8b046b365e58599">§ </a></span>cbor_array_is_definite()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_array_is_definite </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Is the array definite? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the array definite? </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00088">88</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="a291a9f3ff12a2e2c58b2ca8b00280d40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a291a9f3ff12a2e2c58b2ca8b00280d40">§ </a></span>cbor_array_is_indefinite()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_array_is_indefinite </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Is the array indefinite? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the array indefinite? </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00094">94</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="abb1c1c9731a2195857dc471f2a6f60f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb1c1c9731a2195857dc471f2a6f60f5">§ </a></span>cbor_array_push()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_array_push </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>array</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>pushee</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Append to the end. </p>
<p>For indefinite items, storage may be realloacted. For definite items, only the preallocated capacity is available.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">array[borrow]</td><td>An array </td></tr>
<tr><td class="paramname">pushee[incref]</td><td>The item to push </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false on failure </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00052">52</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="a44020515090bbbe91249aff0016ab8e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44020515090bbbe91249aff0016ab8e5">§ </a></span>cbor_array_replace()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_array_replace </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Replace item at an index. </p>
<p>The item being replace will be <a class="el" href="common_8h.html#aa10ebec46eddc9312ec46a0898b5d196" title="Decreases the reference count by one, deallocating the item if needed. ">cbor_decref</a> 'ed.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
<tr><td class="paramname">value[incref]</td><td>The item to assign </td></tr>
<tr><td class="paramname">index</td><td>The index, first item is 0. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false on allocation failure. </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00042">42</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="a382cc2dc480ebb9c7951eb3235be89b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a382cc2dc480ebb9c7951eb3235be89b4">§ </a></span>cbor_array_set()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_array_set </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set item by index. </p>
<p>Creating arrays with holes is not possible</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
<tr><td class="paramname">value[incref]</td><td>The item to assign </td></tr>
<tr><td class="paramname">index</td><td>The index, first item is 0. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false on allocation failure. </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00030">30</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="a4f634a9a4bc834e4ea6ac43e94d51f84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f634a9a4bc834e4ea6ac43e94d51f84">§ </a></span>cbor_array_size()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_array_size </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the number of members. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of members </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00012">12</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="a93d7c18019000d5e206a81a4cca70631"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93d7c18019000d5e206a81a4cca70631">§ </a></span>cbor_new_definite_array()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_new_definite_array </td>
<td>(</td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>size</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create new definite array. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td>Number of slots to preallocate </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><b>new</b> array or <code>NULL</code> upon malloc failure </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00106">106</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
<a id="aaec916ccc6f19782b6aef5ec1da2cc26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaec916ccc6f19782b6aef5ec1da2cc26">§ </a></span>cbor_new_indefinite_array()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_new_indefinite_array </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create new indefinite array. </p>
<dl class="section return"><dt>Returns</dt><dd><b>new</b> array or <code>NULL</code> upon malloc failure </dd></dl>
<p>Definition at line <a class="el" href="arrays_8c_source.html#l00138">138</a> of file <a class="el" href="arrays_8c_source.html">arrays.c</a>.</p>
</div>
</div>
</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>