18cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar/* 2b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * data.c 3b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * 4b1c07156bab839c0502789f09654ec5da8d33c39Blaine Garst * Copyright 2008-2010 Apple, Inc. Permission is hereby granted, free of charge, 5b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * to any person obtaining a copy of this software and associated documentation 6b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * files (the "Software"), to deal in the Software without restriction, 7b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * including without limitation the rights to use, copy, modify, merge, publish, 8b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * distribute, sublicense, and/or sell copies of the Software, and to permit 9b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * persons to whom the Software is furnished to do so, subject to the following 10b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * conditions: 11b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * 12b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * The above copyright notice and this permission notice shall be included in 13b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * all copies or substantial portions of the Software. 14b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * 15b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21b3a6901e66f55b35aa9e01bcb24134e6a65ea004Daniel Dunbar * SOFTWARE. 228cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar * 238cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar */ 248cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar 258cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar/******************** 268cbe163cba77c772621f89ddb33793ac170b1faDaniel DunbarNSBlock support 278cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar 288cbe163cba77c772621f89ddb33793ac170b1faDaniel DunbarWe 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. 298cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar 308cbe163cba77c772621f89ddb33793ac170b1faDaniel DunbarWe 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. 318cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar**********************/ 328cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar 338cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbarvoid * _NSConcreteStackBlock[32] = { 0 }; 348cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbarvoid * _NSConcreteMallocBlock[32] = { 0 }; 358cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbarvoid * _NSConcreteAutoBlock[32] = { 0 }; 368cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbarvoid * _NSConcreteFinalizingBlock[32] = { 0 }; 378cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbarvoid * _NSConcreteGlobalBlock[32] = { 0 }; 388cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbarvoid * _NSConcreteWeakBlockVariable[32] = { 0 }; 398cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar 408cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbarvoid _Block_copy_error(void) { 418cbe163cba77c772621f89ddb33793ac170b1faDaniel Dunbar} 42