Check for SYS/GL during library init. Reason is that
[AROS.git] / rom / oop / privatestubs.c
blob13038f81808a3c51a3f9cc1085fe48290b05a5a5
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Stubs for private methods.
6 Lang: english
7 */
8 #include <proto/oop.h>
9 #include <oop/oop.h>
10 #include "private.h"
11 #include "intern.h"
12 #include <oop/static_mid.h>
14 #undef DEBUG
15 #define DEBUG 0
16 #include <aros/debug.h>
18 BOOL meta_allocdisptabs(OOP_Object *o, OOP_Class *super, struct OOP_InterfaceDescr *ifdescr)
20 struct IntOOPBase *OOPBase = OOP_OOPBASE(o);
21 struct P_meta_allocdisptabs p;
23 if (!OOPBase->ob_M_meta_allocdisptabs)
24 OOPBase->ob_M_meta_allocdisptabs = OOP_GetMethodID(IID_Meta, MO_meta_allocdisptabs);
26 p.mid = OOPBase->ob_M_meta_allocdisptabs;
27 p.superclass = super;
28 p.ifdescr = ifdescr;
30 return ( OOP_DoMethod(o, (OOP_Msg)&p) );
33 VOID meta_freedisptabs(OOP_Object *o)
35 struct IntOOPBase *OOPBase = OOP_OOPBASE(o);
36 struct P_meta_freedisptabs p;
38 if (!OOPBase->ob_M_meta_freedisptabs)
39 OOPBase->ob_M_meta_freedisptabs = OOP_GetMethodID(IID_Meta, MO_meta_freedisptabs);
41 p.mid = OOPBase->ob_M_meta_freedisptabs;
43 OOP_DoMethod(o, (OOP_Msg)&p);
45 return;
50 struct IFMethod *meta_iterateifs(OOP_Object *o, IPTR *iterval_ptr, CONST_STRPTR *interface_id_ptr, ULONG *num_methods_ptr)
52 struct IntOOPBase *OOPBase = OOP_OOPBASE(o);
53 struct P_meta_iterateifs p;
55 if (!OOPBase->ob_M_meta_iterateifs)
56 OOPBase->ob_M_meta_iterateifs = OOP_GetMethodID(IID_Meta, MO_meta_iterateifs);
58 p.mid = OOPBase->ob_M_meta_iterateifs;
59 p.iterval_ptr = iterval_ptr;
60 p.interface_id_ptr = interface_id_ptr;
61 p.num_methods_ptr = num_methods_ptr;
63 return (struct IFMethod *)OOP_DoMethod(o, (OOP_Msg)&p);
67 struct IFMethod *meta_getifinfo(OOP_Object *o, CONST_STRPTR interface_id, ULONG *num_methods_ptr)
69 struct IntOOPBase *OOPBase = OOP_OOPBASE(o);
70 struct P_meta_getifinfo p;
72 if (!OOPBase->ob_M_meta_getifinfo)
73 OOPBase->ob_M_meta_getifinfo = OOP_GetMethodID(IID_Meta, MO_meta_getifinfo);
75 p.mid = OOPBase->ob_M_meta_getifinfo;
76 p.interface_id = interface_id;
77 p.num_methods_ptr = num_methods_ptr;
79 return (struct IFMethod *)OOP_DoMethod(o, (OOP_Msg)&p);
83 #undef OOPBase
85 struct IFMethod *meta_findmethod(OOP_Object *o, OOP_MethodID method_to_find, struct Library *OOPBase)
87 struct IntOOPBase *iOOPBase = (APTR)OOPBase;
88 struct P_meta_findmethod p;
90 if (!iOOPBase->ob_M_meta_findmethod)
91 iOOPBase->ob_M_meta_findmethod = OOP_GetMethodID(IID_Meta, MO_meta_findmethod);
93 p.mid = iOOPBase->ob_M_meta_findmethod;
94 p.method_to_find = method_to_find;
96 return (struct IFMethod *)OOP_DoMethod(o, (OOP_Msg)&p);