I have:
this structure is 268 bytes long, this is correct
now i have:
this structure is now 280 byte long!
in the old FPC Trunk 3.3.1 [about half a year ago]
this structure was 272 bytes long, and this is the correct size!
-
{$push}
-
{$packrecords 4}
-
MIDIPacket = record
-
timeStamp : MIDITimeStamp;
-
length : UInt16;
-
data : packed array [0..255] of Byte;
-
end;
-
MIDIPacketPtr = ^MIDIPacket;
-
{$pop}
-
now i have:
-
{$push}
-
{$packrecords 4}
-
MIDIPacketList = record
-
numPackets: UInt32;
-
packet: array [0..0] of MIDIPacket;
-
end;
-
{$pop}
-
in the old FPC Trunk 3.3.1 [about half a year ago]
this structure was 272 bytes long, and this is the correct size!
so I can work with a ABI...
NOW!!!! :
If you remove your push/pop then it works.
-
type
-
MIDITimeStamp = qword;
-
-
//{$push}
-
{$packrecords 4}
-
MIDIPacket = record
-
timeStamp : MIDITimeStamp;
-
length : UInt16;
-
data : packed array [0..255] of Byte;
-
end;
-
MIDIPacketPtr = ^MIDIPacket;
-
//{$pop}
-
-
-
//{$push}
-
{$packrecords 4}
-
MIDIPacketList = record
-
numPackets: UInt32;
-
packet: array [0..0] of MIDIPacket;
-
end;
-
//{$pop}
-
-
begin
-
writeln('sizeof midi = ', sizeof(MIDIPacket));
-
writeln('sizeof list = ', sizeof(MIDIPacketList));
-
-
-
-
sizeof midi = 268
-
-
sizeof list = 272
THIS can't be!
I thinkt it is an Error in the Compiler
Regards,
Kirill
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel