On Fri, 05 May 2006 15:33:58 +0330, Peter Vreman <[EMAIL PROTECTED]> wrote:

Hi,
lots of types in lcltypes are declared as packed,which i dont know why,
as far as i know lots of them are similar to types with almost exact name
 from windows unit,but as you look at windows unit,none of them are
packed.
also almost all of these records are by itself 2byte or 4byte aligned,ie
removing packed will not influence them.

The problem is in wince, by using packed lots of things change,compiler
now generates unaligned codes,and becouse it defaults packing to
1byte,packed variables might reside in odd number memory places.
This doesnt make problem in program,becouse all accesses are done in one
byte schema,but when sending these records to winapi,they all generate
errors,which is really hard to find too!

I suggest removing all packed records when they are unessesary.

Removing the packed is also required for win64.

So should i send patches to resolve this?
as far as i investigated none of pack records are really needed,but for now we can only change those whose with and without pack keyword,records size remains same,just to be sure nothing happen.








--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to