[DGD] call_other() and static functions

Noah Gibbs noah_gibbs at yahoo.com
Mon Nov 28 22:25:01 CET 2005


  There's also one additional factor you're not taking into account.  Static
functions of the auto object are treated as efuns, and have slightly different
behavior than static functions for any other parent object.

  Just in case you thought you nearly had it figured out :-)

--- Petter Nyström <md1pette at mdstud.chalmers.se> wrote:

> 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
> __________________________________________
> http://mail.dworkin.nl/mailman/listinfo/dgd
> 





	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



More information about the DGD mailing list