[fpc-devel] OSX: Setting up parameters to objc_msgSend()

Dmitry Boyarintsev skalogryz.lists at gmail.com
Fri Oct 12 20:53:28 CEST 2018

On Fri, Oct 12, 2018 at 2:31 PM Jonas Maebe <jonas at freepascal.org> wrote:

> The documentation is wrong.
> Boolean8 is defined as an alias for Boolean in the RTL, so it won't
> help.

If the intent of BooleanN is to help interfacing C-libraries.
Would it make sense to change BooleanN from being an alias to more
consistent behavior with its 16,32 and 64 counterparts?

> The only ways I can think of to fix this are to either add a new
> ObjCBool type to the compiler (or make Pasbool8 a built-in type that is
> different from Boolean, which amounts to the same thing),

There are chances that other libraries might benefit from Boolean8. Not
limited to ObjC declaration/use.

> or to remove
> the optimization for passing boolean types that's specified in the
> x86-64 ABI.
Wouldn't it break the compatibility with any existing x86_64 _Bool code?

If it's the same amount of work anyway, why not to make Boolean8 work as
described in the documentation.
It would save time on fixing docs for sure :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20181012/12605d8e/attachment.html>

More information about the fpc-devel mailing list