[cfe-dev] CIndex changes
Douglas Gregor
dgregor at apple.com
Mon Oct 26 16:45:00 PDT 2009
On Oct 23, 2009, at 11:39 AM, John Thompson wrote:
> Ted/Steve,
>
> Do you want me to check in my changes for DLL-izing CIndex?
Please go ahead, pending the comments below. Thanks!
> I'd like to do so, because Index.h always conflicts when I update.
> Here's a patch against the latest, with just the changes for getting
> the DLL to build.
In this:
+// MSVC DLL import/export.
+#ifdef _MSC_VER
+ #ifdef _CINDEX_LIB_
+ #define CINDEX_LINKAGE __declspec(dllexport)
+ #else
+ #define CINDEX_LINKAGE __declspec(dllimport)
+ #endif
+#endif
we need a
#else
# define CINDEX_LINKAGE
for non-Microsoft compilers.
-typedef void (*CXTranslationUnitIterator)(CXTranslationUnit, CXCursor,
+CINDEX_LINKAGE typedef void (*CXTranslationUnitIterator)
(CXTranslationUnit, CXCursor,
CXClientData);
We don't need dllimport/dllexport on typedefs, right?
- Doug
More information about the cfe-dev
mailing list