Merge pull request #10 from gunyarakun/fix-invalid-return
[cocotron.git] / objc / objc_class.h
blob4bd1552579ff07f4fa0b348c7381447b924eceb6
1 /* Copyright (c) 2006-2007 Christopher J. W. Lloyd
3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
9 #import "ObjCHashTable.h"
10 #import <objc/objc.h>
11 #import "objc_sel.h"
12 #import <objc/runtime.h>
13 #import <objc/message.h>
15 enum {
16 CLASS_INFO_CLASS = 0x001,
17 CLS_CLASS = CLASS_INFO_CLASS,
18 CLASS_INFO_META = 0x002,
19 CLS_META = CLASS_INFO_META,
20 CLASS_INFO_INITIALIZED = 0x004,
21 CLASS_INFO_POSING = 0x008,
22 CLASS_INFO_LINKED = 0x100,
23 CLASS_HAS_CXX_STRUCTORS = 0x2000,
24 CLASS_NO_METHOD_ARRAY = 0x4000
27 typedef struct OBJCMethodDescriptionList {
28 int count;
29 struct objc_method_description list[1];
30 } OBJCMethodDescriptionList;
32 OBJC_EXPORT void OBJCRegisterClass(Class class);
33 OBJC_EXPORT void OBJCRegisterCategoryInClass(Category category, Class class);
35 struct objc_method *OBJCLookupUniqueIdInOnlyThisClass(Class class, SEL uniqueId);
36 OBJC_EXPORT IMP OBJCInitializeLookupAndCacheUniqueIdForObject(id object, SEL message);
37 OBJC_EXPORT IMP OBJCLookupAndCacheUniqueIdForSuper(struct objc_super *super, SEL selector);
39 OBJC_EXPORT void OBJCLinkClassTable(void);
41 BOOL object_cxxConstruct(id self, Class c);
42 BOOL object_cxxDestruct(id self, Class c);