Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1879)

Unified Diff: chrome/browser/mac/closure_blocks_leopard_compat.h

Issue 7657014: Weak-import more symbols in closure_blocks_leopard_compat (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/mac/closure_blocks_leopard_compat.S » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/mac/closure_blocks_leopard_compat.h
===================================================================
--- chrome/browser/mac/closure_blocks_leopard_compat.h (revision 96949)
+++ chrome/browser/mac/closure_blocks_leopard_compat.h (working copy)
@@ -61,6 +61,13 @@
#include <AvailabilityMacros.h>
+#if defined(MAC_OS_X_VERSION_10_6) && \
+ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 // SDK >= 10.6
+// Get the system's own declarations of these things if using an SDK where
+// they are present.
+#include <Block.h>
+#endif // SDK >= 10.6
+
extern "C" {
#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5 // DT <= 10.5
@@ -69,6 +76,13 @@
#define MAYBE_WEAK_IMPORT
#endif // DT <= 10.5
+MAYBE_WEAK_IMPORT extern void* _Block_copy(const void*);
+MAYBE_WEAK_IMPORT extern void _Block_release(const void*);
+MAYBE_WEAK_IMPORT extern void _Block_object_assign(void*,
+ const void*,
+ const int);
+MAYBE_WEAK_IMPORT extern void _Block_object_dispose(const void*, const int);
Nico 2011/08/16 17:18:14 since you declare these here, why do you need the
Mark Mentovai 2011/08/16 17:54:07 Nico wrote:
+
MAYBE_WEAK_IMPORT extern void* _NSConcreteGlobalBlock[32];
MAYBE_WEAK_IMPORT extern void* _NSConcreteStackBlock[32];
@@ -76,4 +90,15 @@
} // extern "C"
+// Macros from <Block.h>, in case <Block.h> is not present.
+
+#ifndef Block_copy
+#define Block_copy(...) \
+ ((__typeof(__VA_ARGS__))_Block_copy((const void *)(__VA_ARGS__)))
+#endif
+
+#ifndef Block_release
+#define Block_release(...) _Block_release((const void *)(__VA_ARGS__))
+#endif
+
#endif // CHROME_BROWSER_MAC_CLOSURE_BLOCKS_LEOPARD_COMPAT_H_
« no previous file with comments | « no previous file | chrome/browser/mac/closure_blocks_leopard_compat.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698