<!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/common.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="#define-members">Macros</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> |
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">common.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include <stdlib.h></code><br />
<code>#include <stddef.h></code><br />
<code>#include <stdint.h></code><br />
<code>#include <stdbool.h></code><br />
<code>#include <assert.h></code><br />
<code>#include "<a class="el" href="data_8h_source.html">data.h</a>"</code><br />
<code>#include "cbor/configuration.h"</code><br />
</div>
<p><a href="common_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="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a9ac79315ed2dcf2c9587e8e3a9a6bc97"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a9ac79315ed2dcf2c9587e8e3a9a6bc97">CBOR_RESTRICT_POINTER</a>   CBOR_RESTRICT_SPECIFIER</td></tr>
<tr class="separator:a9ac79315ed2dcf2c9587e8e3a9a6bc97"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a956e417f98370dd1a96e4dac2e0ed7dd"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a956e417f98370dd1a96e4dac2e0ed7dd">CBOR_VERSION</a>   <a class="el" href="common_8h.html#ae45fd01d870751555ae09a0257f40eb2">TO_STR</a>(CBOR_MAJOR_VERSION) "." <a class="el" href="common_8h.html#ae45fd01d870751555ae09a0257f40eb2">TO_STR</a>(CBOR_MINOR_VERSION) "." <a class="el" href="common_8h.html#ae45fd01d870751555ae09a0257f40eb2">TO_STR</a>(CBOR_PATCH_VERSION)</td></tr>
<tr class="separator:a956e417f98370dd1a96e4dac2e0ed7dd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac61efb646fdd1936ac0ce32829f947b8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#ac61efb646fdd1936ac0ce32829f947b8">CBOR_HEX_VERSION</a>   ((CBOR_MAJOR_VERSION << 16) | (CBOR_MINOR_VERSION << 8) | CBOR_PATCH_VERSION)</td></tr>
<tr class="separator:ac61efb646fdd1936ac0ce32829f947b8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7377cc956f5c81538f0fbf0a0492a539"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a7377cc956f5c81538f0fbf0a0492a539">debug_print</a>(fmt, ...)   do {} while (0)</td></tr>
<tr class="separator:a7377cc956f5c81538f0fbf0a0492a539"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4576b20b5200a67aa939a1ce7fc27bd9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a4576b20b5200a67aa939a1ce7fc27bd9">TO_STR_</a>(x)   #x</td></tr>
<tr class="separator:a4576b20b5200a67aa939a1ce7fc27bd9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae45fd01d870751555ae09a0257f40eb2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#ae45fd01d870751555ae09a0257f40eb2">TO_STR</a>(x)   <a class="el" href="common_8h.html#a4576b20b5200a67aa939a1ce7fc27bd9">TO_STR_</a>(x) /* enables proper double expansion */</td></tr>
<tr class="separator:ae45fd01d870751555ae09a0257f40eb2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a07a781e9212fad361b0f59f7fc921057"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a07a781e9212fad361b0f59f7fc921057">_CBOR_MALLOC</a>   <a class="el" href="common_8h.html#a3218c24af00a3efeaecb1716c8f5a289">_cbor_malloc</a></td></tr>
<tr class="separator:a07a781e9212fad361b0f59f7fc921057"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e39038d9b8e9b3a1e6529c9ff6091b8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a1e39038d9b8e9b3a1e6529c9ff6091b8">_CBOR_REALLOC</a>   <a class="el" href="common_8h.html#a84ecc1fc92c3812ab6ced693f2c6254c">_cbor_realloc</a></td></tr>
<tr class="separator:a1e39038d9b8e9b3a1e6529c9ff6091b8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1300043d7db8adf6ab67f7b787f14635"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a1300043d7db8adf6ab67f7b787f14635">_CBOR_FREE</a>   <a class="el" href="common_8h.html#a994f4145360ef0bfa3c48e59a5ca7186">_cbor_free</a></td></tr>
<tr class="separator:a1300043d7db8adf6ab67f7b787f14635"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ad89d15c2e3f18e8914fcdffe4d725d42"><td class="memItemLeft" align="right" valign="top">typedef void *(* </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42">_cbor_malloc_t</a>) (size_t)</td></tr>
<tr class="separator:ad89d15c2e3f18e8914fcdffe4d725d42"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5b52369a95930104d33301d12faabe75"><td class="memItemLeft" align="right" valign="top">typedef void *(* </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a5b52369a95930104d33301d12faabe75">_cbor_realloc_t</a>) (void *, size_t)</td></tr>
<tr class="separator:a5b52369a95930104d33301d12faabe75"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af05bb33f6d22cdac535576c8edaf208c"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#af05bb33f6d22cdac535576c8edaf208c">_cbor_free_t</a>) (void *)</td></tr>
<tr class="separator:af05bb33f6d22cdac535576c8edaf208c"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3f9f1d527374dbb4b48ef3fafa92e0bf"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a3f9f1d527374dbb4b48ef3fafa92e0bf">cbor_set_allocs</a> (<a class="el" href="common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42">_cbor_malloc_t</a> custom_malloc, <a class="el" href="common_8h.html#a5b52369a95930104d33301d12faabe75">_cbor_realloc_t</a> custom_realloc, <a class="el" href="common_8h.html#af05bb33f6d22cdac535576c8edaf208c">_cbor_free_t</a> custom_free)</td></tr>
<tr class="memdesc:a3f9f1d527374dbb4b48ef3fafa92e0bf"><td class="mdescLeft"> </td><td class="mdescRight">Sets the memory management routines to use. <a href="#a3f9f1d527374dbb4b48ef3fafa92e0bf">More...</a><br /></td></tr>
<tr class="separator:a3f9f1d527374dbb4b48ef3fafa92e0bf"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac2b9aba4cf07857524a0a520eabeef52"><td class="memItemLeft" align="right" valign="top"><a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6">cbor_type</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#ac2b9aba4cf07857524a0a520eabeef52">cbor_typeof</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:ac2b9aba4cf07857524a0a520eabeef52"><td class="mdescLeft"> </td><td class="mdescRight">Get the type of the item. <a href="#ac2b9aba4cf07857524a0a520eabeef52">More...</a><br /></td></tr>
<tr class="separator:ac2b9aba4cf07857524a0a520eabeef52"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a682a023f7012a5b66a57847e6f8d386f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a682a023f7012a5b66a57847e6f8d386f">cbor_isa_uint</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a682a023f7012a5b66a57847e6f8d386f"><td class="mdescLeft"> </td><td class="mdescRight">Does the item have the appropriate major type? <a href="#a682a023f7012a5b66a57847e6f8d386f">More...</a><br /></td></tr>
<tr class="separator:a682a023f7012a5b66a57847e6f8d386f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0ca5042e3807d2cc9c3d40f9266460dd"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a0ca5042e3807d2cc9c3d40f9266460dd">cbor_isa_negint</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a0ca5042e3807d2cc9c3d40f9266460dd"><td class="mdescLeft"> </td><td class="mdescRight">Does the item have the appropriate major type? <a href="#a0ca5042e3807d2cc9c3d40f9266460dd">More...</a><br /></td></tr>
<tr class="separator:a0ca5042e3807d2cc9c3d40f9266460dd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adedaf37527b8d8261e287a0001e5a190"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#adedaf37527b8d8261e287a0001e5a190">cbor_isa_bytestring</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:adedaf37527b8d8261e287a0001e5a190"><td class="mdescLeft"> </td><td class="mdescRight">Does the item have the appropriate major type? <a href="#adedaf37527b8d8261e287a0001e5a190">More...</a><br /></td></tr>
<tr class="separator:adedaf37527b8d8261e287a0001e5a190"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a02edd93bb8eab83bc2b8f8bf5d7d1335"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a02edd93bb8eab83bc2b8f8bf5d7d1335">cbor_isa_string</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a02edd93bb8eab83bc2b8f8bf5d7d1335"><td class="mdescLeft"> </td><td class="mdescRight">Does the item have the appropriate major type? <a href="#a02edd93bb8eab83bc2b8f8bf5d7d1335">More...</a><br /></td></tr>
<tr class="separator:a02edd93bb8eab83bc2b8f8bf5d7d1335"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9ed0fa96105c211867c5032f2a5a8b20"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a9ed0fa96105c211867c5032f2a5a8b20">cbor_isa_array</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a9ed0fa96105c211867c5032f2a5a8b20"><td class="mdescLeft"> </td><td class="mdescRight">Does the item have the appropriate major type? <a href="#a9ed0fa96105c211867c5032f2a5a8b20">More...</a><br /></td></tr>
<tr class="separator:a9ed0fa96105c211867c5032f2a5a8b20"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af0de041481b61922d0995b63f82d8ddd"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#af0de041481b61922d0995b63f82d8ddd">cbor_isa_map</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:af0de041481b61922d0995b63f82d8ddd"><td class="mdescLeft"> </td><td class="mdescRight">Does the item have the appropriate major type? <a href="#af0de041481b61922d0995b63f82d8ddd">More...</a><br /></td></tr>
<tr class="separator:af0de041481b61922d0995b63f82d8ddd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0d5054202c5ec9375e8daf5930087a61"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a0d5054202c5ec9375e8daf5930087a61">cbor_isa_tag</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a0d5054202c5ec9375e8daf5930087a61"><td class="mdescLeft"> </td><td class="mdescRight">Does the item have the appropriate major type? <a href="#a0d5054202c5ec9375e8daf5930087a61">More...</a><br /></td></tr>
<tr class="separator:a0d5054202c5ec9375e8daf5930087a61"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a983dec76e934c49ed6979226f9db4386"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a983dec76e934c49ed6979226f9db4386">cbor_isa_float_ctrl</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a983dec76e934c49ed6979226f9db4386"><td class="mdescLeft"> </td><td class="mdescRight">Does the item have the appropriate major type? <a href="#a983dec76e934c49ed6979226f9db4386">More...</a><br /></td></tr>
<tr class="separator:a983dec76e934c49ed6979226f9db4386"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4e705f34221ba434756a4a1f8e3325e6"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a4e705f34221ba434756a4a1f8e3325e6">cbor_is_int</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a4e705f34221ba434756a4a1f8e3325e6"><td class="mdescLeft"> </td><td class="mdescRight">Is the item an integer, either positive or negative? <a href="#a4e705f34221ba434756a4a1f8e3325e6">More...</a><br /></td></tr>
<tr class="separator:a4e705f34221ba434756a4a1f8e3325e6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4dde28c548375aa954f1cad15b3739aa"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a4dde28c548375aa954f1cad15b3739aa">cbor_is_float</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a4dde28c548375aa954f1cad15b3739aa"><td class="mdescLeft"> </td><td class="mdescRight">Is the item an a floating point number? <a href="#a4dde28c548375aa954f1cad15b3739aa">More...</a><br /></td></tr>
<tr class="separator:a4dde28c548375aa954f1cad15b3739aa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5618a3689e31829f4f84da008e20798e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a5618a3689e31829f4f84da008e20798e">cbor_is_bool</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a5618a3689e31829f4f84da008e20798e"><td class="mdescLeft"> </td><td class="mdescRight">Is the item an a boolean? <a href="#a5618a3689e31829f4f84da008e20798e">More...</a><br /></td></tr>
<tr class="separator:a5618a3689e31829f4f84da008e20798e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad1f5efac647b4d9c437c4441d1177e01"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#ad1f5efac647b4d9c437c4441d1177e01">cbor_is_null</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:ad1f5efac647b4d9c437c4441d1177e01"><td class="mdescLeft"> </td><td class="mdescRight">Does this item represent <code>null</code> <a href="#ad1f5efac647b4d9c437c4441d1177e01">More...</a><br /></td></tr>
<tr class="separator:ad1f5efac647b4d9c437c4441d1177e01"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afb7eb76a2953224c96d194640f3092e3"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#afb7eb76a2953224c96d194640f3092e3">cbor_is_undef</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:afb7eb76a2953224c96d194640f3092e3"><td class="mdescLeft"> </td><td class="mdescRight">Does this item represent <code>undefined</code> <a href="#afb7eb76a2953224c96d194640f3092e3">More...</a><br /></td></tr>
<tr class="separator:afb7eb76a2953224c96d194640f3092e3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa62e72f275c2f0fa604896bfed18e992"><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="common_8h.html#aa62e72f275c2f0fa604896bfed18e992">cbor_incref</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:aa62e72f275c2f0fa604896bfed18e992"><td class="mdescLeft"> </td><td class="mdescRight">Increases the reference count by one. <a href="#aa62e72f275c2f0fa604896bfed18e992">More...</a><br /></td></tr>
<tr class="separator:aa62e72f275c2f0fa604896bfed18e992"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa10ebec46eddc9312ec46a0898b5d196"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#aa10ebec46eddc9312ec46a0898b5d196">cbor_decref</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> **item)</td></tr>
<tr class="memdesc:aa10ebec46eddc9312ec46a0898b5d196"><td class="mdescLeft"> </td><td class="mdescRight">Decreases the reference count by one, deallocating the item if needed. <a href="#aa10ebec46eddc9312ec46a0898b5d196">More...</a><br /></td></tr>
<tr class="separator:aa10ebec46eddc9312ec46a0898b5d196"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4ed20937cc091bc1f481d53787fe306b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a4ed20937cc091bc1f481d53787fe306b">cbor_intermediate_decref</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a4ed20937cc091bc1f481d53787fe306b"><td class="mdescLeft"> </td><td class="mdescRight">Decreases the reference count by one, deallocating the item if needed. <a href="#a4ed20937cc091bc1f481d53787fe306b">More...</a><br /></td></tr>
<tr class="separator:a4ed20937cc091bc1f481d53787fe306b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab27dda20ad909cebaee1b2f43e676f2c"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#ab27dda20ad909cebaee1b2f43e676f2c">cbor_refcount</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:ab27dda20ad909cebaee1b2f43e676f2c"><td class="mdescLeft"> </td><td class="mdescRight">Get the reference count. <a href="#ab27dda20ad909cebaee1b2f43e676f2c">More...</a><br /></td></tr>
<tr class="separator:ab27dda20ad909cebaee1b2f43e676f2c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a327dce45c1cb680953555290dba8e35b"><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="common_8h.html#a327dce45c1cb680953555290dba8e35b">cbor_move</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a327dce45c1cb680953555290dba8e35b"><td class="mdescLeft"> </td><td class="mdescRight">Provides CPP-like move construct. <a href="#a327dce45c1cb680953555290dba8e35b">More...</a><br /></td></tr>
<tr class="separator:a327dce45c1cb680953555290dba8e35b"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a3218c24af00a3efeaecb1716c8f5a289"><td class="memItemLeft" align="right" valign="top"><a class="el" href="common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42">_cbor_malloc_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a3218c24af00a3efeaecb1716c8f5a289">_cbor_malloc</a></td></tr>
<tr class="separator:a3218c24af00a3efeaecb1716c8f5a289"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a84ecc1fc92c3812ab6ced693f2c6254c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="common_8h.html#a5b52369a95930104d33301d12faabe75">_cbor_realloc_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a84ecc1fc92c3812ab6ced693f2c6254c">_cbor_realloc</a></td></tr>
<tr class="separator:a84ecc1fc92c3812ab6ced693f2c6254c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a994f4145360ef0bfa3c48e59a5ca7186"><td class="memItemLeft" align="right" valign="top"><a class="el" href="common_8h.html#af05bb33f6d22cdac535576c8edaf208c">_cbor_free_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="common_8h.html#a994f4145360ef0bfa3c48e59a5ca7186">_cbor_free</a></td></tr>
<tr class="separator:a994f4145360ef0bfa3c48e59a5ca7186"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a1300043d7db8adf6ab67f7b787f14635"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1300043d7db8adf6ab67f7b787f14635">§ </a></span>_CBOR_FREE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define _CBOR_FREE   <a class="el" href="common_8h.html#a994f4145360ef0bfa3c48e59a5ca7186">_cbor_free</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00086">86</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="a07a781e9212fad361b0f59f7fc921057"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07a781e9212fad361b0f59f7fc921057">§ </a></span>_CBOR_MALLOC</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define _CBOR_MALLOC   <a class="el" href="common_8h.html#a3218c24af00a3efeaecb1716c8f5a289">_cbor_malloc</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00084">84</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="a1e39038d9b8e9b3a1e6529c9ff6091b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e39038d9b8e9b3a1e6529c9ff6091b8">§ </a></span>_CBOR_REALLOC</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define _CBOR_REALLOC   <a class="el" href="common_8h.html#a84ecc1fc92c3812ab6ced693f2c6254c">_cbor_realloc</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00085">85</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="ac61efb646fdd1936ac0ce32829f947b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac61efb646fdd1936ac0ce32829f947b8">§ </a></span>CBOR_HEX_VERSION</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CBOR_HEX_VERSION   ((CBOR_MAJOR_VERSION << 16) | (CBOR_MINOR_VERSION << 8) | CBOR_PATCH_VERSION)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00042">42</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="a9ac79315ed2dcf2c9587e8e3a9a6bc97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ac79315ed2dcf2c9587e8e3a9a6bc97">§ </a></span>CBOR_RESTRICT_POINTER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CBOR_RESTRICT_POINTER   CBOR_RESTRICT_SPECIFIER</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00033">33</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="a956e417f98370dd1a96e4dac2e0ed7dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a956e417f98370dd1a96e4dac2e0ed7dd">§ </a></span>CBOR_VERSION</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define CBOR_VERSION   <a class="el" href="common_8h.html#ae45fd01d870751555ae09a0257f40eb2">TO_STR</a>(CBOR_MAJOR_VERSION) "." <a class="el" href="common_8h.html#ae45fd01d870751555ae09a0257f40eb2">TO_STR</a>(CBOR_MINOR_VERSION) "." <a class="el" href="common_8h.html#ae45fd01d870751555ae09a0257f40eb2">TO_STR</a>(CBOR_PATCH_VERSION)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00041">41</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="a7377cc956f5c81538f0fbf0a0492a539"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7377cc956f5c81538f0fbf0a0492a539">§ </a></span>debug_print</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define debug_print</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">fmt, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname"><em>...</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>   do {} while (0)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00053">53</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="ae45fd01d870751555ae09a0257f40eb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae45fd01d870751555ae09a0257f40eb2">§ </a></span>TO_STR</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define TO_STR</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">x</td><td>)</td>
<td>   <a class="el" href="common_8h.html#a4576b20b5200a67aa939a1ce7fc27bd9">TO_STR_</a>(x) /* enables proper double expansion */</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00057">57</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="a4576b20b5200a67aa939a1ce7fc27bd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4576b20b5200a67aa939a1ce7fc27bd9">§ </a></span>TO_STR_</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define TO_STR_</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">x</td><td>)</td>
<td>   #x</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00056">56</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="af05bb33f6d22cdac535576c8edaf208c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af05bb33f6d22cdac535576c8edaf208c">§ </a></span>_cbor_free_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* _cbor_free_t) (void *)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00063">63</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="ad89d15c2e3f18e8914fcdffe4d725d42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad89d15c2e3f18e8914fcdffe4d725d42">§ </a></span>_cbor_malloc_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void*(* _cbor_malloc_t) (size_t)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00061">61</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<a id="a5b52369a95930104d33301d12faabe75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b52369a95930104d33301d12faabe75">§ </a></span>_cbor_realloc_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void*(* _cbor_realloc_t) (void *, size_t)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="common_8h_source.html#l00062">62</a> of file <a class="el" href="common_8h_source.html">common.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="aa10ebec46eddc9312ec46a0898b5d196"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa10ebec46eddc9312ec46a0898b5d196">§ </a></span>cbor_decref()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cbor_decref </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><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Decreases the reference count by one, deallocating the item if needed. </p>
<p>In case the item is deallocated, the reference count of any dependent items is adjusted accordingly in a recursive manner.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[take]</td><td>the item. Set to <code>NULL</code> if deallocated </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00099">99</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="aa62e72f275c2f0fa604896bfed18e992"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa62e72f275c2f0fa604896bfed18e992">§ </a></span>cbor_incref()</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_incref </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><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Increases the reference count by one. </p>
<p>No dependent items are affected.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[incref]</td><td>item the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the input reference </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00093">93</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a4ed20937cc091bc1f481d53787fe306b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ed20937cc091bc1f481d53787fe306b">§ </a></span>cbor_intermediate_decref()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cbor_intermediate_decref </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><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Decreases the reference count by one, deallocating the item if needed. </p>
<p>Convenience wrapper for <a class="el" href="common_8h.html#aa10ebec46eddc9312ec46a0898b5d196" title="Decreases the reference count by one, deallocating the item if needed. ">cbor_decref</a> when its set-to-null behavior is not needed</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[take]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00174">174</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a5618a3689e31829f4f84da008e20798e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5618a3689e31829f4f84da008e20798e">§ </a></span>cbor_is_bool()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_is_bool </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 item an a boolean? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item a boolean? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00071">71</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a4dde28c548375aa954f1cad15b3739aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4dde28c548375aa954f1cad15b3739aa">§ </a></span>cbor_is_float()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_is_float </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 item an a floating point number? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item a floating point number? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00087">87</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a4e705f34221ba434756a4a1f8e3325e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e705f34221ba434756a4a1f8e3325e6">§ </a></span>cbor_is_int()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_is_int </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 item an integer, either positive or negative? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item an integer, either positive or negative? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00065">65</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="ad1f5efac647b4d9c437c4441d1177e01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1f5efac647b4d9c437c4441d1177e01">§ </a></span>cbor_is_null()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_is_null </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>Does this item represent <code>null</code> </p>
<pre class="fragment">embed:rst:leading-asterisk
* .. warning:: This is in no way related to the value of the pointer. Passing a null pointer will most likely result in a crash.
* </pre> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item (CBOR logical) null? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00077">77</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="afb7eb76a2953224c96d194640f3092e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb7eb76a2953224c96d194640f3092e3">§ </a></span>cbor_is_undef()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_is_undef </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>Does this item represent <code>undefined</code> </p>
<pre class="fragment">embed:rst:leading-asterisk
* .. warning:: Care must be taken to distinguish nulls and undefined values in C.
* </pre> <dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item (CBOR logical) undefined? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00082">82</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a9ed0fa96105c211867c5032f2a5a8b20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ed0fa96105c211867c5032f2a5a8b20">§ </a></span>cbor_isa_array()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_isa_array </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>Does the item have the appropriate major type? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item an <a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae48b04b3538ade49d7eae9ee6b656103" title="4 - arrays ">CBOR_TYPE_ARRAY</a>? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00038">38</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="adedaf37527b8d8261e287a0001e5a190"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adedaf37527b8d8261e287a0001e5a190">§ </a></span>cbor_isa_bytestring()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_isa_bytestring </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>Does the item have the appropriate major type? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item a <a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a70b9f0b5958c8d51f15ad7bb7c4af01d" title="2 - byte strings ">CBOR_TYPE_BYTESTRING</a>? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00028">28</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a983dec76e934c49ed6979226f9db4386"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a983dec76e934c49ed6979226f9db4386">§ </a></span>cbor_isa_float_ctrl()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_isa_float_ctrl </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>Does the item have the appropriate major type? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item a <a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a1276dcc4ac56df5fd7e0270344a6e57d" title="7 - decimals and special values (true, false, nil, ...) ">CBOR_TYPE_FLOAT_CTRL</a>? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00053">53</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="af0de041481b61922d0995b63f82d8ddd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0de041481b61922d0995b63f82d8ddd">§ </a></span>cbor_isa_map()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_isa_map </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>Does the item have the appropriate major type? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item a <a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a057fc3133cb4465f9eb734acfd195db2" title="5 - maps ">CBOR_TYPE_MAP</a>? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00043">43</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a0ca5042e3807d2cc9c3d40f9266460dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ca5042e3807d2cc9c3d40f9266460dd">§ </a></span>cbor_isa_negint()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_isa_negint </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>Does the item have the appropriate major type? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item a <a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae140516103af792c8f2af84390acfdcd" title="1 - negative integers ">CBOR_TYPE_NEGINT</a>? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00023">23</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a02edd93bb8eab83bc2b8f8bf5d7d1335"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02edd93bb8eab83bc2b8f8bf5d7d1335">§ </a></span>cbor_isa_string()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_isa_string </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>Does the item have the appropriate major type? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item a <a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6ae05102a66420250eacd5f17b95d04443" title="3 - strings ">CBOR_TYPE_STRING</a>? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00033">33</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a0d5054202c5ec9375e8daf5930087a61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d5054202c5ec9375e8daf5930087a61">§ </a></span>cbor_isa_tag()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_isa_tag </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>Does the item have the appropriate major type? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item a <a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a16f0eaf29eeea66fe37ec1ed0fa45415" title="6 - tags ">CBOR_TYPE_TAG</a>? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00048">48</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a682a023f7012a5b66a57847e6f8d386f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a682a023f7012a5b66a57847e6f8d386f">§ </a></span>cbor_isa_uint()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool cbor_isa_uint </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>Does the item have the appropriate major type? </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the item an <a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6a2137d55d8028e37ff4319a633ef0634f" title="0 - positive integers ">CBOR_TYPE_UINT</a>? </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00018">18</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a327dce45c1cb680953555290dba8e35b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a327dce45c1cb680953555290dba8e35b">§ </a></span>cbor_move()</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_move </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><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Provides CPP-like move construct. </p>
<p>Decreases the reference count by one, but does not deallocate the item even if its refcount reaches zero. This is useful for passing intermediate values to functions that increase reference count. Should only be used with functions that <code>incref</code> their arguments.</p>
<pre class="fragment">embed:rst:leading-asterisk
* .. warning:: If the item is moved without correctly increasing the reference count afterwards, the memory will be leaked.
* </pre><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[take]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the item with reference count decreased by one </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00184">184</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="ab27dda20ad909cebaee1b2f43e676f2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab27dda20ad909cebaee1b2f43e676f2c">§ </a></span>cbor_refcount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_refcount </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 reference count. </p>
<pre class="fragment">embed:rst:leading-asterisk
* .. warning:: This does *not* account for transitive references.
* </pre><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>the item </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the reference count </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00179">179</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<a id="a3f9f1d527374dbb4b48ef3fafa92e0bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f9f1d527374dbb4b48ef3fafa92e0bf">§ </a></span>cbor_set_allocs()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void cbor_set_allocs </td>
<td>(</td>
<td class="paramtype"><a class="el" href="common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42">_cbor_malloc_t</a> </td>
<td class="paramname"><em>custom_malloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="common_8h.html#a5b52369a95930104d33301d12faabe75">_cbor_realloc_t</a> </td>
<td class="paramname"><em>custom_realloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="common_8h.html#af05bb33f6d22cdac535576c8edaf208c">_cbor_free_t</a> </td>
<td class="paramname"><em>custom_free</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the memory management routines to use. </p>
<p>Only available when CBOR_CUSTOM_ALLOC is truthy</p>
<pre class="fragment">embed:rst:leading-asterisk
* .. warning:: This function modifies the global state and should therefore be used accordingly. Changing the memory handlers while allocated items exist will result in a ``free``/``malloc`` mismatch. This function is not thread safe with respect to both itself and all the other *libcbor* functions that work with the heap.
* .. note:: `realloc` implementation must correctly support `NULL` reallocation
* </pre><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">custom_malloc</td><td>malloc implementation </td></tr>
<tr><td class="paramname">custom_realloc</td><td>realloc implementation </td></tr>
<tr><td class="paramname">custom_free</td><td>free implementation </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="allocators_8c_source.html#l00014">14</a> of file <a class="el" href="allocators_8c_source.html">allocators.c</a>.</p>
</div>
</div>
<a id="ac2b9aba4cf07857524a0a520eabeef52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac2b9aba4cf07857524a0a520eabeef52">§ </a></span>cbor_typeof()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="data_8h.html#a3a931b40fc31b51cccfd1bc3dc5fc5d6">cbor_type</a> cbor_typeof </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 type of the item. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The type </dd></dl>
<p>Definition at line <a class="el" href="common_8c_source.html#l00059">59</a> of file <a class="el" href="common_8c_source.html">common.c</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a994f4145360ef0bfa3c48e59a5ca7186"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a994f4145360ef0bfa3c48e59a5ca7186">§ </a></span>_cbor_free</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="common_8h.html#af05bb33f6d22cdac535576c8edaf208c">_cbor_free_t</a> _cbor_free</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="allocators_8c_source.html#l00012">12</a> of file <a class="el" href="allocators_8c_source.html">allocators.c</a>.</p>
</div>
</div>
<a id="a3218c24af00a3efeaecb1716c8f5a289"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3218c24af00a3efeaecb1716c8f5a289">§ </a></span>_cbor_malloc</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="common_8h.html#ad89d15c2e3f18e8914fcdffe4d725d42">_cbor_malloc_t</a> _cbor_malloc</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="allocators_8c_source.html#l00010">10</a> of file <a class="el" href="allocators_8c_source.html">allocators.c</a>.</p>
</div>
</div>
<a id="a84ecc1fc92c3812ab6ced693f2c6254c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84ecc1fc92c3812ab6ced693f2c6254c">§ </a></span>_cbor_realloc</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="common_8h.html#a5b52369a95930104d33301d12faabe75">_cbor_realloc_t</a> _cbor_realloc</td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="allocators_8c_source.html#l00011">11</a> of file <a class="el" href="allocators_8c_source.html">allocators.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>