![]() |
![]()
| ![]() |
![]()
SYNOPSISbool bson_steal (bson_t *dst, bson_t *src); PARAMETERS
DESCRIPTIONEfficiently transfer the contents of src to dst and destroy src. Before calling this function, src must be initialized and dst must be uninitialized. After this function returns successfully, src is destroyed, and dst is initialized and must be freed with bson_destroy(). For example, if you have a higher-level structure that wraps a bson_t, use bson_steal to transfer BSON data into it: typedef struct { RETURNSReturns true if src was successfully moved to dst, false if src is invalid, or was statically initialized, or another error occurred. SEE ALSO: bson_destroy_with_steal(), a lower-level function that returns the raw contents of a bson_t. AUTHORMongoDB, Inc COPYRIGHT2009-present, MongoDB, Inc.
|