-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Docs, Docs Examples
-
None
-
(copied to CRM)
Background & Motivation
C driver API which accepts a bson_t* reply expects the reply to be uninitialized. This is inconsistently documented.
mongoc_collection_command_simple notes:
reply: A location to initialize a bson_t. This should be on the stack.
mongoc_database_command_simple notes:
reply: A location to store the commands first result document.
mongoc_client_session_commit_transaction notes:
reply: An optional uninitialized bson_t to receive the server reply, or NULL.
Scope
Audit the documentation for all API methods that take a bson_t* reply and consistently document that the reply must be uninitialized and cannot be the pointer returned by bson_new.