Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
FPC - LongInt size on non-Windows 64bit platforms #197
Comments
@Alexey-T Before I provide a fix, could you please do a test to make sure that the error exists? All you need is, using fpc, to create a python engine at MacOS64 / Linunx 64, call |
Ok
app start in Ubuntu 20 x64 - caption is True |
(Ubuntu has Py 3.8) |
Thanks. Could you please try the following: var
P1, P2: PPyObject;
with PythonEngine do begin
P1 := PyInt_AsLong(1);
P2 := PyNumber_Negative(P1);
Assert(PyInt_AsLong(P2) = -1);
end; |
@Alexey-T So what is the verdict? |
I was busy, will test today |
It didnt compile, fixed to
and it runs OK here. |
@Alexey-T The discrepancy should cause the above to fail. Shouldn't it? Unless fpc takes account of that and does automatic conversions. Does looking at the generated assembly code shed some light? |
Could you please try the following as well:
|
Yes, it is Linux x64, Py 3.8. |
@Alexey-T Can you confirm that FPC longInt is 32 bits (4 bytes) in Ubuntu 64 bits? |
It shows 4
ubuntu x64 |
App is for linux x64 |
@Alexey-T Could you please try the above tests on a Mac, so that I can close the issue. |
See Alexey-T/Python-for-Lazarus#22