[fpc-devel] C library header - var vs pointer for function arguments

Dmitry Boyarintsev skalogryz.lists at gmail.com
Thu Aug 4 02:18:03 CEST 2022


Consider backwards compatibility in fixes

On Wednesday, August 3, 2022, gabor via fpc-devel <
fpc-devel at lists.freepascal.org> wrote:

> I'd like to provide some fixes for packages that are headers for c
> libraries. When and should I use the "var" argument for function arguments
> that return a value, or should I always use pointers (excluding arguments
> that might accept nil)?
>
> Eg:
> function Foo(var A: Integer): Integer;
> vs
> function Foo(A: PInteger): Integer;
>
> Michał.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20220803/b589a9b6/attachment.htm>


More information about the fpc-devel mailing list