11590Srgrimes/*===-- clang-c/CXString.h - C Index strings  --------------------*- C -*-===*\
21590Srgrimes|*                                                                            *|
31590Srgrimes|*                     The LLVM Compiler Infrastructure                       *|
41590Srgrimes|*                                                                            *|
51590Srgrimes|* This file is distributed under the University of Illinois Open Source      *|
61590Srgrimes|* License. See LICENSE.TXT for details.                                      *|
71590Srgrimes|*                                                                            *|
81590Srgrimes|*===----------------------------------------------------------------------===*|
91590Srgrimes|*                                                                            *|
101590Srgrimes|* This header provides the interface to C Index strings.                     *|
111590Srgrimes|*                                                                            *|
121590Srgrimes\*===----------------------------------------------------------------------===*/
131590Srgrimes
141590Srgrimes#ifndef CLANG_CXSTRING_H
151590Srgrimes#define CLANG_CXSTRING_H
161590Srgrimes
171590Srgrimes#include "clang-c/Platform.h"
181590Srgrimes
191590Srgrimes#ifdef __cplusplus
201590Srgrimesextern "C" {
211590Srgrimes#endif
221590Srgrimes
231590Srgrimes/**
241590Srgrimes * \defgroup CINDEX_STRING String manipulation routines
251590Srgrimes * \ingroup CINDEX
261590Srgrimes *
271590Srgrimes * @{
281590Srgrimes */
291590Srgrimes
301590Srgrimes/**
311590Srgrimes * \brief A character string.
321590Srgrimes *
331590Srgrimes * The \c CXString type is used to return strings from the interface when
341590Srgrimes * the ownership of that string might different from one call to the next.
351590Srgrimes * Use \c clang_getCString() to retrieve the string data and, once finished
361590Srgrimes * with the string data, call \c clang_disposeString() to free the string.
371590Srgrimes */
381590Srgrimestypedef struct {
391590Srgrimes  const void *data;
401590Srgrimes  unsigned private_flags;
411590Srgrimes} CXString;
421590Srgrimes
431590Srgrimes/**
441590Srgrimes * \brief Retrieve the character data associated with the given string.
451590Srgrimes */
461590SrgrimesCINDEX_LINKAGE const char *clang_getCString(CXString string);
471590Srgrimes
481590Srgrimes/**
491590Srgrimes * \brief Free the given string,
501590Srgrimes */
511590SrgrimesCINDEX_LINKAGE void clang_disposeString(CXString string);
521590Srgrimes
531590Srgrimes/**
541590Srgrimes * @}
551590Srgrimes */
561590Srgrimes
571590Srgrimes#ifdef __cplusplus
581590Srgrimes}
591590Srgrimes#endif
601590Srgrimes#endif
611590Srgrimes
621590Srgrimes