<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="bson_copy">
  <info>
    <link type="guide" xref="bson_t" group="function"/>
  </info>
  <title>bson_copy()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[bson_t *
bson_copy (const bson_t *bson);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p>bson</p></td><td><p>A <code xref="bson_t">bson_t</code>.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>The <code xref="bson_copy">bson_copy()</code> function shall copy the contents of a bson document into a new <code xref="bson_t">bson_t</code>.</p>
    <p>The resulting <code xref="bson_t">bson_t</code> should be freed with <code xref="bson_destroy">bson_destroy()</code>.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>A newly allocated <code xref="bson_t">bson_t</code> that should be freed with <code xref="bson_destroy">bson_destroy()</code>.</p>
  </section>
</page>
