[CDRIVER-2838] Document ObjectID unsafe functions Created: 28/Sep/18  Updated: 30/Oct/23  Resolved: 30/Oct/23

Status: Closed
Project: C Driver
Component/s: docs, libbson
Affects Version/s: None
Fix Version/s: 1.25.0

Type: Improvement Priority: Trivial - P5
Reporter: Kevin Albertson Assignee: Adrian Dole
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Quarter: FY24Q3

 Description   

There are multiple functions that operate on ObjectIDs in libbson that have unsafe variants:

bson_oid_compare_unsafe
bson_oid_equal_unsafe
bson_oid_hash_unsafe
bson_oid_copy_unsafe
bson_oid_init_from_string_unsafe
bson_oid_get_time_t_unsafe

The unsafe variants omit null checks and are marked inline. They are undocumented.
The "safe" variants just check that arguments are not null before calling the unsafe variant.



 Comments   
Comment by Githook User [ 27/Oct/23 ]

Author:

{'name': 'Adrian Dole', 'email': 'adrian@dole.tech', 'username': 'adriandole'}

Message: CDRIVER-2838 Document ObjectID unsafe functions (#1428)

Document BSON ObjectID unsafe functions
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/74bb5a06f6cf07235d065ec73c224ea349b18592

Generated at Wed Feb 07 21:16:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.