[fpc-pascal] Pipe vs Memory buffer.

Sven Barth pascaldragon at googlemail.com
Sun Jan 29 23:47:54 CET 2017


Am 29.01.2017 23:33 schrieb "Lars" <noreply at z505.com>:
>
> On Sun, January 29, 2017 6:04 am, José Mejuto wrote:
> > El 28/01/2017 a las 13:32, fredvs escribió:
> >
> >
> >> TOpusFileCallbacks = record
> >> read: op_read_func;
> >> seek: op_seek_func;
> >> tell: op_tell_func;
> >> close: op_close_func;
> >> end;
> >>
> >> This does not work:
> >>
> >>
> >> HandleOP := op_test_callbacks(pointer(InPipe),op_callbacks,
> >> BufferURL[0],
> >> PipeBufferSize, err);
> >>
> >>
> >
> > Hello,
> >
> >
> > As you need to use records you should specify {$PACKRECORDS C} or you
> > could get a different record layout than C expects.
> >
> > --
>
> Doesn't some C compilers pack records differently, so packrecords is only
> compatiable with GNU c compiler but some other compiler could do it
> differently? Sorry I don't know

FPC adheres to the system's ABI. So packrecords c might result in different
records on e.g. Linux or Windows or even the same OS on different platforms.
So as long as the used C compiler adheres to the ABI as well, there
shouldn't be any problem.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170129/88ba47e2/attachment.html>


More information about the fpc-pascal mailing list