[DGD] call_other() and static functions

Petter Nyström md1pette at mdstud.chalmers.se
Mon Nov 28 22:14:01 CET 2005


A few quick tests and their results before someone shuts me up with a 
definite answer. I tried the following pair of functions:

 	nomask static int foo ()
 	{
 	    return 1;
 	}

 	int bar ()
 	{
 	    return !!call_other(this_object(), "foo");
 	}

It turns out that under my lib and driver calling bar() returns 1 if the 
two functions are defined in a non-inherited program and 0 if they are 
defined in an inherited program. (Such as the auto object, where the 
problem first turned up.) Why this is so, I have no idea. I do not put it 
beyond myself that I have screwed something up myself somehow. Or is this 
for some reason intended behaviour?

More cheers,

Jimorie



More information about the DGD mailing list