xref: /xnu-8792.81.2/libkern/libclosure/libclosuredata.c (revision 19c3b8c28c31cb8130e034cfb5df6bf9ba342d90)
1 /*
2  * data.c
3  * libclosure
4  *
5  * Copyright (c) 2008-2010 Apple Inc. All rights reserved.
6  *
7  * @APPLE_LLVM_LICENSE_HEADER@
8  *
9  */
10 
11 /********************
12  *  NSBlock support
13  *
14  *  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.
15  *
16  *  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.
17  **********************/
18 
19 void * _NSConcreteStackBlock[32] = { 0 };
20 void * _NSConcreteMallocBlock[32] = { 0 };
21 void * _NSConcreteAutoBlock[32] = { 0 };
22 void * _NSConcreteFinalizingBlock[32] = { 0 };
23 void * _NSConcreteGlobalBlock[32] = { 0 };
24 void * _NSConcreteWeakBlockVariable[32] = { 0 };
25