[DGD] Re: Couple DGD questions

E. Harte harte at xs4all.nl
Thu Jun 11 09:40:56 CEST 1998


On Wed, 10 Jun 1998, Frank Schmidt wrote:

[...]
> In the auto object, a static function behaves like a kernel function
> (kfun) _too_: It cannot be accessed by call_other(this_object(),
> "kfun_func"), _and_ calls to it in the auto object are _not_ redirected
> to any masked function in this_object(). This is true for ALL static
> functionnames in the auto object, not just the default functions
> specified by the driver you happen to override.

I'd like to have confirmation or denial of the last part from Dworkin, as
most definitely remember there being a difference between using a 'pure'
kfun in the auto-object and a static function that happened to be defined
in the auto-object.

[...]
> > <auto-object>
> > static int
> > valid_write(string filename)
> > {
> > }
> > 
> > static void
> > write_file(string filename)
> > {
> > }
> > </auto-object>
> > 
> > <other-object>
> > static int
> > valid_write(string filename)
> > {
> >     return 1; /* of course ;) */
> > }
> > </other-object>
> 
> No, sorry, but this will not disable his security IF the security call is
> made in the auto object, but it will override the call made in an
> inherited program.

Oh?  Again, I'd like confirmation of this.  (Or else I'll go check the
sources myself this weekend. *grin*)

[...]
> > Sometimes I wish there was a way to make static functions in the auto-
> > object behave the same way without having to nomask them. :-)
> 
> Nomasking a function makes it impossible to overload in an inheriting
> program. However, that is not the same as static, private or kfun, since
> you can still access a nomasked function!
> 
> And.. Your wishes have come true! It is possible to make the functions
> behave like kfuns, just declare them static in the auto object. And it is
> VERY convinient, flexible and elegant. :)

*points at previous comments*

[...]
> Maybe, but I too missed that point. Any ref. to where in the docs this is
> explained?

+--- Quoting from doc/Introduction ---
|    void create()
|
|        Called in an object which has just been cloned, or if it is not a
|        clone, just before a function is called in it for the first time.
|        The actual name of this function is configurable.
+---

[...]

Erwin -- Now, coffee!




List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list