Re: [fpc-devel] {$i ascdef.inc} / stdcall

2024-05-06 Thread Marco van de Voort via fpc-devel



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

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.



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] {$i ascdef.inc} / stdcall

2024-05-06 Thread Sven Barth via fpc-devel
Martin Frb via fpc-devel  schrieb am Mo.,
6. Mai 2024, 14:11:

> 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

>
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] {$i ascdef.inc} / stdcall

2024-05-06 Thread Martin Frb via fpc-devel

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.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel