Sign in Join

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

Mailing lists / fpc-devel / 2024-05

{$i ascdef.inc} / stdcall

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Martin Frb

Maybe of interest?

The include file {$i ascdef.inc} is used from unit Windows with {$calling stdcall}
in effect.

Most functions in it therefore don't have "stdcall". But some do. Is that known/wanted/...?

Similar in some other includes.

Reply by email

Sven Barth
to Martin Frb

Martin Frb via fpc-devel schrieb am Mo.,
6. Mai 2024, 14:11:

Show quoted text 11 lines
Maybe of interest? The include file {$i ascdef.inc} is used from unit Windows with {$calling stdcall} in effect. Most functions in it therefore don't have "stdcall". But some do. Is that known/wanted/...? Similar in some other includes.

The majority of Windows functions indeed is stdcall, so the "$calling" is correct as it simplifies things (though it might be cleaner to move it from an include to the unit itself). Those functions that have an additional "stdcall" modifier don't hurt.
The important point is that those few functions that really are "cdecl" are marked as such.

Please note that "stdcall" does not matter on non-i386 as it's simply mapped to the platform default there.

Regards,
Sven

Reply by email

Marco van de Voort
to Martin Frb: Maybe of interest? The include file {$i ascdef.inc} is used from unit Windows with…

Op 6-5-2024 om 14:11 schreef Martin Frb via fpc-devel:

Show quoted text 8 lines
Maybe of interest? The include file {$i ascdef.inc} is used from unit Windows with {$calling stdcall} in effect. Most functions in it therefore don't have "stdcall". But some do. Is that known/wanted/...?

No particular reason. Historic reasons in original header conversion, and not considred bad enough to polutte VCS to correct it.

Reply by email