Daniel Dunbar | 8cbe163 | 2009-06-26 16:21:04 +0000 | [diff] [blame] | 1 | /* |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame^] | 2 | * data.c |
Daniel Dunbar | 8cbe163 | 2009-06-26 16:21:04 +0000 | [diff] [blame] | 3 | * |
Daniel Dunbar | b3a6901 | 2009-06-26 16:47:03 +0000 | [diff] [blame^] | 4 | * Copyright 2008-2009 Apple, Inc. Permission is hereby granted, free of charge, |
| 5 | * to any person obtaining a copy of this software and associated documentation |
| 6 | * files (the "Software"), to deal in the Software without restriction, |
| 7 | * including without limitation the rights to use, copy, modify, merge, publish, |
| 8 | * distribute, sublicense, and/or sell copies of the Software, and to permit |
| 9 | * persons to whom the Software is furnished to do so, subject to the following |
| 10 | * conditions: |
| 11 | * |
| 12 | * The above copyright notice and this permission notice shall be included in |
| 13 | * all copies or substantial portions of the Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | * SOFTWARE. |
| 22 | * |
Daniel Dunbar | 8cbe163 | 2009-06-26 16:21:04 +0000 | [diff] [blame] | 23 | */ |
| 24 | |
| 25 | /******************** |
| 26 | NSBlock support |
| 27 | |
| 28 | We allocate space and export a symbol to be used as the Class for the on-stack and malloc'ed copies until ObjC arrives on the scene. These data areas are set up by Foundation to link in as real classes post facto. |
| 29 | |
| 30 | We keep these in a separate file so that we can include the runtime code in test subprojects but not include the data so that compiled code that sees the data in libSystem doesn't get confused by a second copy. Somehow these don't get unified in a common block. |
| 31 | **********************/ |
| 32 | |
| 33 | void * _NSConcreteStackBlock[32] = { 0 }; |
| 34 | void * _NSConcreteMallocBlock[32] = { 0 }; |
| 35 | void * _NSConcreteAutoBlock[32] = { 0 }; |
| 36 | void * _NSConcreteFinalizingBlock[32] = { 0 }; |
| 37 | void * _NSConcreteGlobalBlock[32] = { 0 }; |
| 38 | void * _NSConcreteWeakBlockVariable[32] = { 0 }; |
| 39 | |
| 40 | void _Block_copy_error(void) { |
| 41 | } |