]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't include <CoreFoundation/CFBase.h> because it in turn includes MacTypes.h which...
authorDavid Elliott <dfe@tgwbd.org>
Sat, 7 Jul 2007 22:10:02 +0000 (22:10 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Sat, 7 Jul 2007 22:10:02 +0000 (22:10 +0000)
Instead, declare the CFTypeRef type and the CFRelease and CFRetain functions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47226 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mac/corefoundation/cfref.h

index 7506791c0f77eae2faffeb0c78faeb830dc962bf..53d46e78c1f228f7b02759c7d5365ab19844bc34 100644 (file)
 #ifndef _WX_MAC_COREFOUNDATION_CFREF_H__
 #define _WX_MAC_COREFOUNDATION_CFREF_H__
 
-#include <CoreFoundation/CFBase.h>
+// #include <CoreFoundation/CFBase.h>
+/* Don't include CFBase.h such that this header can be included from public
+ * headers with minimal namespace pollution.
+ * Note that Darwin CF uses extern for CF_EXPORT.  If we need this on Win32
+ * or non-Darwin Mac OS we'll need to define the appropriate __declspec.
+ */
+extern "C" {
+typedef const void *CFTypeRef;
+extern /* CF_EXPORT */
+CFTypeRef CFRetain(CFTypeRef cf);
+extern /* CF_EXPORT */
+void CFRelease(CFTypeRef cf);
+} // extern "C"
+
 
 /*! @function   wxCFRelease
     @abstract   A CFRelease variant that checks for NULL before releasing.