| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BASE_MAC_CLOSURE_BLOCKS_LEOPARD_COMPAT_H_ | 5 #ifndef BASE_MAC_CLOSURE_BLOCKS_LEOPARD_COMPAT_H_ |
| 6 #define BASE_MAC_CLOSURE_BLOCKS_LEOPARD_COMPAT_H_ | 6 #define BASE_MAC_CLOSURE_BLOCKS_LEOPARD_COMPAT_H_ |
| 7 #pragma once | |
| 8 | 7 |
| 9 // libclosure (blocks) compatibility for Mac OS X 10.5 (Leopard) | 8 // libclosure (blocks) compatibility for Mac OS X 10.5 (Leopard) |
| 10 // | 9 // |
| 11 // Background material: | 10 // Background material: |
| 12 // http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Blocks | 11 // http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Blocks |
| 13 // http://opensource.apple.com/source/libclosure/libclosure-38/ | 12 // http://opensource.apple.com/source/libclosure/libclosure-38/ |
| 14 // | 13 // |
| 15 // Leopard doesn't support blocks. Chrome supports Leopard. Chrome needs to use | 14 // Leopard doesn't support blocks. Chrome supports Leopard. Chrome needs to use |
| 16 // blocks. | 15 // blocks. |
| 17 // | 16 // |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 #ifndef Block_copy | 94 #ifndef Block_copy |
| 96 #define Block_copy(...) \ | 95 #define Block_copy(...) \ |
| 97 ((__typeof(__VA_ARGS__))_Block_copy((const void *)(__VA_ARGS__))) | 96 ((__typeof(__VA_ARGS__))_Block_copy((const void *)(__VA_ARGS__))) |
| 98 #endif | 97 #endif |
| 99 | 98 |
| 100 #ifndef Block_release | 99 #ifndef Block_release |
| 101 #define Block_release(...) _Block_release((const void *)(__VA_ARGS__)) | 100 #define Block_release(...) _Block_release((const void *)(__VA_ARGS__)) |
| 102 #endif | 101 #endif |
| 103 | 102 |
| 104 #endif // BASE_MAC_CLOSURE_BLOCKS_LEOPARD_COMPAT_H_ | 103 #endif // BASE_MAC_CLOSURE_BLOCKS_LEOPARD_COMPAT_H_ |
| OLD | NEW |