Fpc defines
function CreateConsoleScreenBuffer(dwDesiredAccess:DWORD;
dwShareMode:DWORD; var lpSecurityAttributes:SECURITY_ATTRIBUTES;
dwFlags:DWORD; lpScreenBufferData:LPVOID):HANDLE; external 'kernel32'
name 'CreateConsoleScreenBuffer';
`lpSecurityAttributes` is a `var` param in the above. But
https://learn.microsoft.com/en-us/windows/console/createconsolescreenbuffer
states that the param is optional and can be null/nil.
var param don't accept nil. So this should be a pointer instead.
Yet, this was reported in
https://gitlab.com/freepascal.org/fpc/source/-/issues/5836
That issue got closed "*Fixed in version:* 1.9.9"
Only "git blame" shows no change to that line ever. (Well afaik some
commits are not in git, so could be).
So the question is: Was it fixed and broken again? Was it fixed but not
committed?
Or does the cryptic comment
Pascal CONST can be both by reference (thus consuming a *) or by value.
This is the only safe way.
mean its a "wont fix" ?
And if that is the case, then what does this comment mean?
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel