1 /*===-- clang-c/CXString.h - C Index strings  --------------------*- C -*-===*\
2 |*                                                                            *|
3 |*                     The LLVM Compiler Infrastructure                       *|
4 |*                                                                            *|
5 |* This file is distributed under the University of Illinois Open Source      *|
6 |* License. See LICENSE.TXT for details.                                      *|
7 |*                                                                            *|
8 |*===----------------------------------------------------------------------===*|
9 |*                                                                            *|
10 |* This header provides the interface to C Index strings.                     *|
11 |*                                                                            *|
12 \*===----------------------------------------------------------------------===*/
13 
14 module clang.c.CXString;
15 
16 extern (C):
17 
18 /**
19  * \defgroup CINDEX_STRING String manipulation routines
20  * \ingroup CINDEX
21  *
22  * @{
23  */
24 
25 /**
26  * A character string.
27  *
28  * The \c CXString type is used to return strings from the interface when
29  * the ownership of that string might differ from one call to the next.
30  * Use \c clang_getCString() to retrieve the string data and, once finished
31  * with the string data, call \c clang_disposeString() to free the string.
32  */
33 struct CXString
34 {
35     const(void)* data;
36     uint private_flags;
37 }
38 
39 struct CXStringSet
40 {
41     CXString* Strings;
42     uint Count;
43 }
44 
45 /**
46  * Retrieve the character data associated with the given string.
47  */
48 const(char)* clang_getCString(CXString string);
49 
50 /**
51  * Free the given string.
52  */
53 void clang_disposeString(CXString string);
54 
55 /**
56  * Free the given string set.
57  */
58 void clang_disposeStringSet(CXStringSet* set);
59 
60 /**
61  * @}
62  */
63