If you use {$A+} all fields should appear to aligned to 8 byte boundaries
(The default).
I think would be easier to make it controllable, to use packed record and
add some "Foo Bar" padding variables if needed.
If the original structure is continuous then packed record with correct
field sizes should be used. it there are gaps in original still i would use
packed record and add padding into the gaps.
Anyhow very nice to see this kind of effort going on!
-Tee-
On Tue, Mar 17, 2015 at 11:40 AM, Vlad Khorsun <hv...@users.sourceforge.net>
wrote:
> 17.03.2015 10:06, liviusliv...@poczta.onet.pl wrote:
> >> but I see what hapened
> >> Whe should decide about buffer alignment
> >> I can use "packed record" instead of "record" then data are as is
> >> But what is your buffer alignment when you fill data in that record?
> >>
> >
> >>> Search for type_alignments:
> >>> https://github.com/FirebirdSQL/core/blob/master/src/jrd/align.h#L83
> >>> Adriano
> >
> > This does not help
> > Something is wrong when i add types like
> > - Int64
> > - SmallInt
> >
> > i tried all alignments Byte, Word, DWord, QWord
>
> After re-reading docs
>
>
> http://docwiki.embarcadero.com/RADStudio/XE6/en/Internal_Data_Formats#Record_Types
>
> i'd say you should not use nor special(explicit) alignment nor packed
> records. Just ensure you have {$A+} when record type is declared and
> you use record members with data types of correct size each.
>
> Sorry, i have no Delphi right now to check by myself
>
> Regards,
> Vlad
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> Firebird-Devel mailing list, web interface at
> https://lists.sourceforge.net/lists/listinfo/firebird-devel
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel