<div class="gmail_quote">On Nov 29, 2014 3:55 AM, "Ewald" <<a href="mailto:ewald@yellowcouch.org">ewald@yellowcouch.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Take the following function prototype (in {$mode objfpc}{$H+} for the<br>
record):<br>
<br>
Function SomeFunction(const Data: PChar; const Len: LongWord):<br>
String; cdecl; public;<br>
<br>
Looking at the dissasembly of this function, I see that is actually has<br>
three arguments. It looks more like this from an assembler perspective:<br>
<br>
Function SomeFunction(HiddenArgument: Pointer; const Data: PChar;<br>
const Len: LongWord): String; cdecl; public;<br>
<br>
Which is, well, quite fascinating really. What is it doing there? I<br>
suspect it has something to do with the result type of the function,<br>
being a string?<br>
<br>
Can anybody shed some light on this?<br>
<br>
--<br>
Ewald<br>
<br>
<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br>
</blockquote></div>