Skip to content

Commit 74bb5a0

Browse files
authored
CDRIVER-2838 Document ObjectID unsafe functions (#1428)
Document BSON ObjectID unsafe functions
1 parent 30455d0 commit 74bb5a0

7 files changed

+108
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:man_page: bson_oid_compare_unsafe
2+
3+
bson_oid_compare_unsafe()
4+
=========================
5+
6+
Synopsis
7+
--------
8+
9+
.. code-block:: c
10+
11+
static inline int
12+
bson_oid_compare_unsafe (const bson_oid_t *oid1, const bson_oid_t *oid2);
13+
14+
Description
15+
-----------
16+
17+
Identical to :symbol:`bson_oid_compare()`, but performs no integrity checking.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:man_page: bson_oid_copy_unsafe
2+
3+
bson_oid_copy_unsafe()
4+
======================
5+
6+
Synopsis
7+
--------
8+
9+
.. code-block:: c
10+
11+
static inline void
12+
bson_oid_copy_unsafe (const bson_oid_t *src, bson_oid_t *dst);
13+
14+
Description
15+
-----------
16+
17+
Identical to :symbol:`bson_oid_copy()`, but performs no integrity checking.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:man_page: bson_oid_equal_unsafe
2+
3+
bson_oid_equal_unsafe()
4+
=======================
5+
6+
Synopsis
7+
--------
8+
9+
.. code-block:: c
10+
11+
static inline bool
12+
bson_oid_equal_unsafe (const bson_oid_t *oid1, const bson_oid_t *oid2);
13+
14+
Description
15+
-----------
16+
17+
Identical to :symbol:`bson_oid_equal()`, but performs no integrity checking.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:man_page: bson_oid_get_time_t_unsafe
2+
3+
bson_oid_get_time_t_unsafe()
4+
============================
5+
6+
Synopsis
7+
--------
8+
9+
.. code-block:: c
10+
11+
static inline time_t
12+
bson_oid_get_time_t_unsafe (const bson_oid_t *oid);
13+
14+
Description
15+
-----------
16+
17+
Identical to :symbol:`bson_oid_get_time_t()`, but performs no integrity checking.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:man_page: bson_oid_hash_unsafe
2+
3+
bson_oid_hash_unsafe()
4+
======================
5+
6+
Synopsis
7+
--------
8+
9+
.. code-block:: c
10+
11+
static inline uint32_t
12+
bson_oid_hash_unsafe (const bson_oid_t *oid);
13+
14+
Description
15+
-----------
16+
17+
Identical to :symbol:`bson_oid_hash()`, but performs no integrity checking.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:man_page: bson_oid_init_from_string_unsafe
2+
3+
bson_oid_init_from_string_unsafe()
4+
==================================
5+
6+
Synopsis
7+
--------
8+
9+
.. code-block:: c
10+
11+
static inline void
12+
bson_oid_init_from_string_unsafe (bson_oid_t *oid, const char *str);
13+
14+
Description
15+
-----------
16+
17+
Identical to :symbol:`bson_oid_init_from_string()`, but performs no integrity checking.

src/libbson/doc/bson_oid_t.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,19 @@ You can validate that a string containing a hex-encoded ObjectID is valid using
5757
:maxdepth: 1
5858

5959
bson_oid_compare
60+
bson_oid_compare_unsafe
6061
bson_oid_copy
62+
bson_oid_copy_unsafe
6163
bson_oid_equal
64+
bson_oid_equal_unsafe
6265
bson_oid_get_time_t
66+
bson_oid_get_time_t_unsafe
6367
bson_oid_hash
68+
bson_oid_hash_unsafe
6469
bson_oid_init
6570
bson_oid_init_from_data
6671
bson_oid_init_from_string
72+
bson_oid_init_from_string_unsafe
6773
bson_oid_init_sequence
6874
bson_oid_is_valid
6975
bson_oid_to_string

0 commit comments

Comments
 (0)