On 02/02/2020 04:22, fredvs via fpc-pascal wrote:
Hello everybody.

Good time to go back with that problem and fix it forever the right way!
The problem is isolated and is fixed "hardcoded".

 From rev 42375, in msegui function dynarrayelesize(const typinfo:
pdynarraytypeinfo): sizeint; inline;
the result is always = 0.


I do not know if fpc has an official way to get the size of an array element from the typeinfo.

But comparing the internals:
{$ifdef VER3_0}
      typeInfo:=aligntoptr(typeInfo+2+PByte(typeInfo)[1]);
{$else VER3_0}
      typeInfo:=aligntoqword(typeInfo+2+PByte(typeInfo)[1]);
{$endif VER3_0}

So alignment changed, which is why the old code no longer works

mse always does

 ti:= aligntoptr(ti);

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to