On Thu, 2010-08-05 at 17:36 +0400, Sergei Gorelkin wrote: > Joost van der Sluis пишет: > > ... > > I don't know what's the best way to fix this.
> > 2: See if we can let the caller do the > > interface-pointer-to-class-pointer conversion. That way the wrapper is > > not necessary anymore. Leads to somewhat faster code, though less > > compact. But this is only possible if the caller has enough information > > to do the conversion. I'm not sure if that's the case. > > > Unfortunately, the caller cannot make any assumptions about the implementor's > internal structure. The callee side may as well be a non-Pascal code. The caller doesn't have to make any assumptions. It passes the 'self' pointer on the stack, since it knows that the callee wants that. But I see now that this can't work. Because the 'callee' expects the interface-pointer, not the class-pointer. And we can change that for pascal-callee's, but not for others. So it comes down on the same thing: this option can't work. I'll try option 1 as you and Jonas pointed out that shoudn't be a problem. Joost. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel