]> granicus.if.org Git - clang/commit
Introduce CXString type and associated functions clang_getCString() and clang_dispose...
authorSteve Naroff <snaroff@apple.com>
Mon, 9 Nov 2009 17:45:52 +0000 (17:45 +0000)
committerSteve Naroff <snaroff@apple.com>
Mon, 9 Nov 2009 17:45:52 +0000 (17:45 +0000)
commitef0cef6cec8de5fc60e469a93436eed7212e0dc2
tree09f4ed0fbd89774f185ec5c068cc4d34601737cd
parent1c03ca30ae962199ef702324b48550f6af7fdc32
Introduce CXString type and associated functions clang_getCString() and clang_disposeString().

This abstraction will help us manage string memory for complex names that cross the C++/C boundary (e.g. ObjC methods, selectors). This patch also uses it in clang_getTranslationUnitSpelling (which I'm not sure is necessary). Will investigate later...since the extra malloc() can't hurt (for now).

Patch by John Thompson.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86562 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang-c/Index.h
tools/CIndex/CIndex.cpp
tools/CIndex/CIndex.exports
tools/c-index-test/c-index-test.c