|
|
|||
File indexing completed on 2026-05-10 08:36:17
0001 /*===-- clang-c/CXString.h - C Index strings --------------------*- C -*-===*\ 0002 |* *| 0003 |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| 0004 |* Exceptions. *| 0005 |* See https://llvm.org/LICENSE.txt for license information. *| 0006 |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| 0007 |* *| 0008 |*===----------------------------------------------------------------------===*| 0009 |* *| 0010 |* This header provides the interface to C Index strings. *| 0011 |* *| 0012 \*===----------------------------------------------------------------------===*/ 0013 0014 #ifndef LLVM_CLANG_C_CXSTRING_H 0015 #define LLVM_CLANG_C_CXSTRING_H 0016 0017 #include "clang-c/ExternC.h" 0018 #include "clang-c/Platform.h" 0019 0020 LLVM_CLANG_C_EXTERN_C_BEGIN 0021 0022 /** 0023 * \defgroup CINDEX_STRING String manipulation routines 0024 * \ingroup CINDEX 0025 * 0026 * @{ 0027 */ 0028 0029 /** 0030 * A character string. 0031 * 0032 * The \c CXString type is used to return strings from the interface when 0033 * the ownership of that string might differ from one call to the next. 0034 * Use \c clang_getCString() to retrieve the string data and, once finished 0035 * with the string data, call \c clang_disposeString() to free the string. 0036 */ 0037 typedef struct { 0038 const void *data; 0039 unsigned private_flags; 0040 } CXString; 0041 0042 typedef struct { 0043 CXString *Strings; 0044 unsigned Count; 0045 } CXStringSet; 0046 0047 /** 0048 * Retrieve the character data associated with the given string. 0049 * 0050 * The returned data is a reference and not owned by the user. This data 0051 * is only valid while the `CXString` is valid. This function is similar 0052 * to `std::string::c_str()`. 0053 */ 0054 CINDEX_LINKAGE const char *clang_getCString(CXString string); 0055 0056 /** 0057 * Free the given string. 0058 */ 0059 CINDEX_LINKAGE void clang_disposeString(CXString string); 0060 0061 /** 0062 * Free the given string set. 0063 */ 0064 CINDEX_LINKAGE void clang_disposeStringSet(CXStringSet *set); 0065 0066 /** 0067 * @} 0068 */ 0069 0070 LLVM_CLANG_C_EXTERN_C_END 0071 0072 #endif 0073
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|