Fixed compatibility of output.
[AROS.git] / compiler / alib / dosupermethod.c
blobd6a761f2f83721509f16b809ecf147abfa381ef5
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #define ALIB_NO_INLINE_STDARG
8 #include <intuition/classes.h>
9 #include <stdarg.h>
10 #include <proto/alib.h>
11 #include "alib_intern.h"
13 /******************************************************************************
15 NAME */
16 #include <intuition/classusr.h>
17 #include <proto/alib.h>
19 IPTR DoSuperMethodA (
21 /* SYNOPSIS */
22 Class * cl,
23 Object * obj,
24 Msg message)
26 /* FUNCTION
27 Invokes a method on a BOOPSI object, as if the object were an instance
28 of the superclass of the class passed in. That is, the dispatcher of
29 the superclass is called instead of the object's class's dispatcher
30 (assuming the specified class is the object's own class).
32 INPUTS
33 cl - Class whose superclass's dispatcher is to be called. This is
34 typically the object's own class.
35 obj - The object on which the method is to be performed.
36 message - The message. The first field is the same for all methods and
37 specifies which method is to be invoked (see
38 <intuition/classusr.h>).
40 RESULT
41 Class and method dependent. See the class documentation. A value of 0
42 can mean a valid return code but can also mean that a method was not
43 supported.
45 NOTES
47 EXAMPLE
49 BUGS
51 SEE ALSO
52 intuition.library/NewObjectA(), intuition.library/SetAttrsA(),
53 intuition.library/GetAttr(), intuition.library/DisposeObject(),
54 DoMethodA(), CoerceMethodA(), <intuition/classes.h>
56 ******************************************************************************/
58 if ((!obj) || (!cl))
59 return 0L;
60 return CALLHOOKPKT((struct Hook *)cl->cl_Super, obj, message);
61 } /* DoSuperMethodA() */
64 IPTR DoSuperMethod (Class * cl, Object * obj, STACKULONG MethodID, ...)
66 if ((!obj) || (!cl))
67 return 0L;
68 AROS_SLOWSTACKMETHODS_PRE(MethodID)
69 retval = CALLHOOKPKT((struct Hook *)cl->cl_Super, obj, AROS_SLOWSTACKMETHODS_ARG(MethodID));
70 AROS_SLOWSTACKMETHODS_POST
71 } /* DoSuperMethod()*/