[INTERPRETER]

* BUG: Inherited startup Main methods work again.


git-svn-id: svn://localhost/gambas/trunk@2807 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2010-03-18 15:40:34 +00:00
parent 6cd1d9d0d3
commit 7f00049b8b

View file

@ -1385,12 +1385,12 @@ __RETURN:
void EXEC_public_desc(CLASS *class, void *object, CLASS_DESC_METHOD *desc, int nparam)
{
EXEC.object = object;
EXEC.class = desc->class; // Because the method can be an inherited one!
EXEC.nparam = nparam; /*desc->npmin;*/
EXEC.drop = FALSE;
if (FUNCTION_is_native(desc))
{
EXEC.class = class; // EXEC_native() does not need the real class, except the GB.GetClass(NULL) API used by Form.Main.
EXEC.native = TRUE;
EXEC.use_stack = FALSE;
EXEC.desc = desc;
@ -1401,6 +1401,7 @@ void EXEC_public_desc(CLASS *class, void *object, CLASS_DESC_METHOD *desc, int n
}
else
{
EXEC.class = desc->class; // EXEC_function_real() needs the effective class, because the method can be an inherited one!
EXEC.native = FALSE;
EXEC.index = (int)(intptr_t)desc->exec;
EXEC_function_keep();