Path: blob/main/contrib/llvm-project/clang/include/clang-c/CXString.h
35233 views
/*===-- clang-c/CXString.h - C Index strings --------------------*- C -*-===*\1|* *|2|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|3|* Exceptions. *|4|* See https://llvm.org/LICENSE.txt for license information. *|5|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|6|* *|7|*===----------------------------------------------------------------------===*|8|* *|9|* This header provides the interface to C Index strings. *|10|* *|11\*===----------------------------------------------------------------------===*/1213#ifndef LLVM_CLANG_C_CXSTRING_H14#define LLVM_CLANG_C_CXSTRING_H1516#include "clang-c/ExternC.h"17#include "clang-c/Platform.h"1819LLVM_CLANG_C_EXTERN_C_BEGIN2021/**22* \defgroup CINDEX_STRING String manipulation routines23* \ingroup CINDEX24*25* @{26*/2728/**29* A character string.30*31* The \c CXString type is used to return strings from the interface when32* the ownership of that string might differ from one call to the next.33* Use \c clang_getCString() to retrieve the string data and, once finished34* with the string data, call \c clang_disposeString() to free the string.35*/36typedef struct {37const void *data;38unsigned private_flags;39} CXString;4041typedef struct {42CXString *Strings;43unsigned Count;44} CXStringSet;4546/**47* Retrieve the character data associated with the given string.48*/49CINDEX_LINKAGE const char *clang_getCString(CXString string);5051/**52* Free the given string.53*/54CINDEX_LINKAGE void clang_disposeString(CXString string);5556/**57* Free the given string set.58*/59CINDEX_LINKAGE void clang_disposeStringSet(CXStringSet *set);6061/**62* @}63*/6465LLVM_CLANG_C_EXTERN_C_END6667#endif68697071