fix confusing doc string

This commit is contained in:
Dustin J. Mitchell
2022-01-26 00:36:33 +00:00
parent c5ff2398f7
commit f8cffb798c
2 changed files with 8 additions and 6 deletions

View File

@@ -92,9 +92,10 @@ impl<'a> From<&str> for TCString<'a> {
/// Create a new TCString referencing the given C string. The C string must remain valid until /// Create a new TCString referencing the given C string. The C string must remain valid until
/// after the TCString is freed. It's typically easiest to ensure this by using a static string. /// after the TCString is freed. It's typically easiest to ensure this by using a static string.
/// ///
/// NOTE: this function does _not_ take responsibility for freeing the C string itself. /// NOTE: this function does _not_ take responsibility for freeing the C string itself. The
/// The underlying string once the TCString has been freed. Among other times, TCStrings are /// underlying string can be freed once the TCString referencing it has been freed.
/// freed when they are passed to API functions (unless documented otherwise). For example: ///
/// For example:
/// ///
/// ``` /// ```
/// char *url = get_item_url(..); // dynamically allocate C string /// char *url = get_item_url(..); // dynamically allocate C string

View File

@@ -117,9 +117,10 @@ void tc_replica_free(struct TCReplica *rep);
* Create a new TCString referencing the given C string. The C string must remain valid until * Create a new TCString referencing the given C string. The C string must remain valid until
* after the TCString is freed. It's typically easiest to ensure this by using a static string. * after the TCString is freed. It's typically easiest to ensure this by using a static string.
* *
* NOTE: this function does _not_ take responsibility for freeing the C string itself. * NOTE: this function does _not_ take responsibility for freeing the C string itself. The
* The underlying string once the TCString has been freed. Among other times, TCStrings are * underlying string can be freed once the TCString referencing it has been freed.
* freed when they are passed to API functions (unless documented otherwise). For example: *
* For example:
* *
* ``` * ```
* char *url = get_item_url(..); // dynamically allocate C string * char *url = get_item_url(..); // dynamically allocate C string