Skip to content

Delphi compatibility: varUInt32 was added but TVarData.varUInt32 was not.

Summary

Delphi added the TVarData.varUInt32 member when varUInt32 was added. To be completely compatible, FPC should add a varUInt32 member to TVarData too. Otherwise projects using TVarData directly will have to distinguish between FPC and Delphi.

Example Project

The Zeos library currently uses the following code:

                        {$IF Declared(varUInt32)}
                        TVarData(Result).VType := varUInt32;
                        TVarData(Result).VUInt32 := FData.pvCardinal;
                        {$ELSE}
                        TVarData(Result).VType := varLongWord;
                        TVarData(Result).VLongWord := FData.pvCardinal;
                        {$IFEND}

Without this change it doesn't work with FPC trunk.

Relevant 3rd party information

https://docwiki.embarcadero.com/Libraries/Sydney/en/System.TVarData

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information