Skip to content

Commit 8dbba2b

Browse files
CDRIVER-4586: Add missing docs for v_decimal128 in bson_value_t (#1226)
Also clarify the meaning and structure of bson_decimal128_t
1 parent 68681cd commit 8dbba2b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/libbson/doc/bson_decimal128_t.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ Synopsis
2929
Description
3030
-----------
3131

32-
The :symbol:`bson_decimal128_t` structure
33-
represents the IEEE-754 Decimal128 data type.
32+
The :symbol:`bson_decimal128_t` structure represents the IEEE-754 Decimal128
33+
data type. The type ``bson_decimal128_t`` is an aggregate that contains two
34+
``uint64_t``\ s, named ``high`` and ``low``. The declaration and layout order
35+
between them depends on the endian order of the target platform: ``low`` will
36+
always correspond to the low-order bits of the Decimal128 object, while ``high``
37+
corresponds to the high-order bits. The ``bson_decimal128_t`` always has a size
38+
of sixteen (``16``), and can be bit-cast to/from a ``_Decimal128``.
3439

3540
.. only:: html
3641

src/libbson/doc/bson_value_t.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Synopsis
6262
uint32_t len;
6363
char *symbol;
6464
} v_symbol;
65+
bson_decimal128_t v_decimal128;
6566
} value;
6667
} bson_value_t;
6768

0 commit comments

Comments
 (0)