On 05 Aug 2010, at 15:18, Joost van der Sluis wrote:

1: replace the 'call' in the wrapper with a 'jmp'. I've tried this and
it works, but when the function returns, the 'self'-class-pointer is not converted to the interface-pointer. But I don't see why this is done in
the first place?!?

It's described in the comments:

***
(1): The code is the following
     set self parameter to correct value
     call mangledname
     set self parameter to interface value
     ret

     This is different to case (0) because in theory, the caller
     could reuse the data pushed on the stack so we've to return
     it unmodified because self is const.
***

However, at least nowadays self is a value parameter rather than a const parameter, so it shouldn't matter anymore.


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to