Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-07

Question about 'const' and calling conventions

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

Hi all,

In a safecall method definition on win32, is a parameter with the 'const' identifier always passed by reference?

Or is it 'compiler decide' like the normal calling convention?

I need to know to be sure if the code I'm working on works on accident or as designed. ;)

Joost.

Reply by email

Desmond Coertzen
to Jonas Maebe

Is a const passed by reference in pascal calling convention? I hope so.

Jonas Maebe wrote 14 lines
On 20 Jul 2010, at 18:18, Joost van der Sluis wrote: > In a safecall method definition on win32, is a parameter with the > 'const' identifier always passed by reference? I don't see any code in the parameter managers that would have this effect. Jonas _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Desmond Coertzen
to Desmond Coertzen

Answer to my own question to be found in thread with subject "cdecl and constant parameters"

On Tue, Jul 20, 2010 at 11:12 PM, Desmond Coertzen <

Show quoted text 24 lines
wrote: Is a const passed by reference in pascal calling convention? I hope so. On Tue, Jul 20, 2010 at 9:07 PM, Jonas Maebe wrote: > > On 20 Jul 2010, at 18:18, Joost van der Sluis wrote: > > > In a safecall method definition on win32, is a parameter with the > > 'const' identifier always passed by reference? > > I don't see any code in the parameter managers that would have this > effect. > > > Jonas > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel >

Reply by email