Skip to content

Commit a8e66d7

Browse files
iseki0compnerd
andauthored
[docs] Add a more detailed description in CXString.h. (#119090)
Emmm... Maybe I'm splitting hairs. But I really think the paragraph should be more detailed. The orginal document makes me confused. Do I take the ownership of the string data? Here I don't refer the `clang_disposeString` function, because here's a `clang_disposeStringSet`. Co-authored-by: Saleem Abdulrasool <[email protected]>
1 parent f229ea2 commit a8e66d7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/include/clang-c/CXString.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ typedef struct {
4646

4747
/**
4848
* Retrieve the character data associated with the given string.
49+
*
50+
* The returned data is a reference and not owned by the user. This data
51+
* is only valid while the `CXString` is valid. This function is similar
52+
* to `std::string::c_str()`.
4953
*/
5054
CINDEX_LINKAGE const char *clang_getCString(CXString string);
5155

0 commit comments

Comments
 (0)