Skip to content

Commit

Permalink
doc: linkify bson_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Hergert committed May 29, 2014
1 parent 1db74e8 commit 8efcdf6
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions doc/bson_copy.page
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ bson_copy (const bson_t *bson);

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

<section id="return">
<title>Returns</title>
<p>A newly allocated _bson_t_ that should be freed with _bson_destroy()_.</p>
<p>A newly allocated <link xref="bson_t">bson_t</link> that should be freed with _bson_destroy()_.</p>
</section>
</page>
2 changes: 1 addition & 1 deletion doc/bson_copy_to.page
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ bson_copy_to (const bson_t *src,
<section id="description">
<title>Description</title>
<p>The _bson_copy_to()_ function shall initialize _dst_ with a copy of the contents of _src_.</p>
<p>_dst_ *MUST* be an uninitialized _bson_t_ to avoid leaking memory.</p>
<p>_dst_ *MUST* be an uninitialized <link xref="bson_t">bson_t</link> to avoid leaking memory.</p>
</section>

</page>
4 changes: 2 additions & 2 deletions doc/bson_destroy_with_steal.page
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ bson_destroy_with_steal (bson_t *bson,

<section id="description">
<title>Description</title>
<p>The _bson_destroy_with_steal()_ function shall destroy a _bson_t_ structure but return the underlying buffer instead of freeing it. If steal is false, this is equivalent to calling bson_destroy(). It is a programming error to call this function on a _bson_t_ that is not a top-level _bson_t_, shuch as those initialized with _bson_append_document_begin()_, _bson_append_array_begin()_, and _bson_writer_begin()_.</p>
<p>The _bson_destroy_with_steal()_ function shall destroy a <link xref="bson_t">bson_t</link> structure but return the underlying buffer instead of freeing it. If steal is false, this is equivalent to calling bson_destroy(). It is a programming error to call this function on a <link xref="bson_t">bson_t</link> that is not a top-level <link xref="bson_t">bson_t</link>, shuch as those initialized with _bson_append_document_begin()_, _bson_append_array_begin()_, and _bson_writer_begin()_.</p>
</section>

<section id="return">
<title>Returns</title>
<p>_bson_destroy_with_steal()_ shall return a buffer containing the contents of the _bson_t_ if _steal_ is non-zero. This should be freed with _bson_free()_ when no longer in use. _length_ will be set to the length of the bson document if non-NULL.</p>
<p>_bson_destroy_with_steal()_ shall return a buffer containing the contents of the <link xref="bson_t">bson_t</link> if _steal_ is non-zero. This should be freed with _bson_free()_ when no longer in use. _length_ will be set to the length of the bson document if non-NULL.</p>
</section>
</page>
2 changes: 1 addition & 1 deletion doc/bson_get_data.page
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bson_get_data (const bson_t *bson);

<section id="description">
<title>Description</title>
<p>The _bson_get_data()_ function shall return the raw buffer of a bson document. This can be used in conjunction with the _len_ property of a _bson_t_ if you want to copy the raw buffer around.</p>
<p>The _bson_get_data()_ function shall return the raw buffer of a bson document. This can be used in conjunction with the _len_ property of a <link xref="bson_t">bson_t</link> if you want to copy the raw buffer around.</p>
</section>

<section id="return">
Expand Down
2 changes: 1 addition & 1 deletion doc/bson_init.page
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bson_init (bson_t *b);

<section id="description">
<title>Description</title>
<p>The _bson_init()_ function shall initialize a _bson_t_ that is placed on the stack. This is equivalent to initializing a _bson_t_ to _BSON_INITIALIZER_.</p>
<p>The _bson_init()_ function shall initialize a <link xref="bson_t">bson_t</link> that is placed on the stack. This is equivalent to initializing a <link xref="bson_t">bson_t</link> to _BSON_INITIALIZER_.</p>
</section>

</page>
4 changes: 2 additions & 2 deletions doc/bson_init_static.page
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ bson_init_static (bson_t *b,

<section id="description">
<title>Description</title>
<p>The _bson_init_static()_ function shall shall initialize a read-only _bson_t_ on the stack using the data provided. No copies of the data will be made and therefore must remain valid for the lifetime of the _bson_t_.</p>
<p>The _bson_init_static()_ function shall shall initialize a read-only <link xref="bson_t">bson_t</link> on the stack using the data provided. No copies of the data will be made and therefore must remain valid for the lifetime of the <link xref="bson_t">bson_t</link>.</p>
</section>

<section id="return">
<title>Returns</title>
<p>_bson_init_static()_ will return _true_ if the _bson_t_ was successfully initialized.</p>
<p>_bson_init_static()_ will return _true_ if the <link xref="bson_t">bson_t</link> was successfully initialized.</p>
</section>

</page>
2 changes: 1 addition & 1 deletion doc/bson_iter_utf8.page
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bson_iter_utf8 (const bson_iter_t *iter,
<section id="return">
<title>Returns</title>
<p>A UTF-8 encoded string that has not been modified or freed.</p>
<p>It is suggested that the caller validate the content is valid UTF-8 before using this in other places. That can be done by calling _bson_utf8_validate()_ or validating the underlying _bson_t_ before iterating it.</p>
<p>It is suggested that the caller validate the content is valid UTF-8 before using this in other places. That can be done by calling _bson_utf8_validate()_ or validating the underlying <link xref="bson_t">bson_t</link> before iterating it.</p>
<p>Note that not all drivers use multi-byte representation for <code>\0</code> in UTF-8 encodings (commonly referred to as modified-UTF8). You probably want to take a look at the length field when marshaling to other runtimes.</p>
</section>
</page>
4 changes: 2 additions & 2 deletions doc/bson_new.page
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ bson_new (void);

<section id="description">
<title>Description</title>
<p>The _bson_new()_ function shall create a new _bson_t_ structure on the heap. It should be freed with _bson_destroy()_ when it is no longer in use.</p>
<p>The _bson_new()_ function shall create a new <link xref="bson_t">bson_t</link> structure on the heap. It should be freed with _bson_destroy()_ when it is no longer in use.</p>
</section>

<section id="return">
<title>Returns</title>
<p>A newly allocated _bson_t_ that should be freed with _bson_destroy()_.</p>
<p>A newly allocated <link xref="bson_t">bson_t</link> that should be freed with _bson_destroy()_.</p>
</section>

</page>
4 changes: 2 additions & 2 deletions doc/bson_new_from_data.page
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ bson_new_from_data (const uint8_t *data,

<section id="description">
<title>Description</title>
<p>The _bson_new_from_data()_ function shall create a new _bson_t_ on the heap and copy the contents of _data_. This may be helpful when working with language bindings but is generally expected to be slower.</p>
<p>The _bson_new_from_data()_ function shall create a new <link xref="bson_t">bson_t</link> on the heap and copy the contents of _data_. This may be helpful when working with language bindings but is generally expected to be slower.</p>
</section>

<section id="return">
<title>Returns</title>
<p>A newly allocated _bson_t_ if successful, otherwise NULL.</p>
<p>A newly allocated <link xref="bson_t">bson_t</link> if successful, otherwise NULL.</p>
</section>

</page>
2 changes: 1 addition & 1 deletion doc/bson_reader_read.page
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bson_reader_read (bson_reader_t *reader,

<section id="return">
<title>Returns</title>
<p>A _bson_t_ that should not be modified or freed.</p>
<p>A <link xref="bson_t">bson_t</link> that should not be modified or freed.</p>
</section>

<section id="example">
Expand Down
2 changes: 1 addition & 1 deletion doc/bson_reinit.page
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bson_reinit (bson_t *b);
<section id="description">
<title>Description</title>
<p>The _bson_reinit()_ function shall be equivalent to calling _bson_destroy()_ and _bson_init()_.</p>
<p>However, if the _bson_t_ structure contains a malloc()'d buffer, it may be reused.</p>
<p>However, if the <link xref="bson_t">bson_t</link> structure contains a malloc()'d buffer, it may be reused.</p>
</section>

</page>
2 changes: 1 addition & 1 deletion doc/bson_sized_new.page
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bson_sized_new (size_t size);

<section id="return">
<title>Returns</title>
<p>A newly allocated _bson_t_ that should be freed with _bson_destroy()_.</p>
<p>A newly allocated <link xref="bson_t">bson_t</link> that should be freed with _bson_destroy()_.</p>
</section>

</page>

0 comments on commit 8efcdf6

Please sign in to comment.