1239313Sdim/*===-- clang-c/CXString.h - C Index strings --------------------*- C -*-===*\ 2239313Sdim|* *| 3239313Sdim|* The LLVM Compiler Infrastructure *| 4239313Sdim|* *| 5239313Sdim|* This file is distributed under the University of Illinois Open Source *| 6239313Sdim|* License. See LICENSE.TXT for details. *| 7239313Sdim|* *| 8239313Sdim|*===----------------------------------------------------------------------===*| 9239313Sdim|* *| 10239313Sdim|* This header provides the interface to C Index strings. *| 11239313Sdim|* *| 12239313Sdim\*===----------------------------------------------------------------------===*/ 13239313Sdim 14239313Sdim#ifndef CLANG_CXSTRING_H 15239313Sdim#define CLANG_CXSTRING_H 16239313Sdim 17239313Sdim#include "clang-c/Platform.h" 18239313Sdim 19239313Sdim#ifdef __cplusplus 20239313Sdimextern "C" { 21239313Sdim#endif 22239313Sdim 23239313Sdim/** 24239313Sdim * \defgroup CINDEX_STRING String manipulation routines 25239313Sdim * \ingroup CINDEX 26239313Sdim * 27239313Sdim * @{ 28239313Sdim */ 29239313Sdim 30239313Sdim/** 31239313Sdim * \brief A character string. 32239313Sdim * 33239313Sdim * The \c CXString type is used to return strings from the interface when 34239313Sdim * the ownership of that string might different from one call to the next. 35239313Sdim * Use \c clang_getCString() to retrieve the string data and, once finished 36239313Sdim * with the string data, call \c clang_disposeString() to free the string. 37239313Sdim */ 38239313Sdimtypedef struct { 39249423Sdim const void *data; 40239313Sdim unsigned private_flags; 41239313Sdim} CXString; 42239313Sdim 43239313Sdim/** 44239313Sdim * \brief Retrieve the character data associated with the given string. 45239313Sdim */ 46239313SdimCINDEX_LINKAGE const char *clang_getCString(CXString string); 47239313Sdim 48239313Sdim/** 49263508Sdim * \brief Free the given string. 50239313Sdim */ 51239313SdimCINDEX_LINKAGE void clang_disposeString(CXString string); 52239313Sdim 53239313Sdim/** 54239313Sdim * @} 55239313Sdim */ 56239313Sdim 57239313Sdim#ifdef __cplusplus 58239313Sdim} 59239313Sdim#endif 60239313Sdim#endif 61239313Sdim 62