-
-
Notifications
You must be signed in to change notification settings - Fork 317
updated MethodCallback unit: now it don't work on FPC ARM64 #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Seems old version did not have this variant of func:
|
The contributed changes in MethodCallback.pas provided Delphi support for Andoid and the Apple M2 chip. I do not use CPUARM so I am not in a position to test with either fpc or Delphi, so I cannot help. But if you, or anybody else, can make work with fpc, that would be great. |
My situation: I compile app for Linux aarch64. I guess it must work because it works for you on Adroid(==Linux). but it doesn't. EDIT |
Yes, it is picking GetCallback from CPUARM64, I added 'dd' and then it cannot compile. |
What do you mean? |
I mean I added some 'crap' inside the block
and crap breaks the compiling for CPU ARM64. so this block is used! |
@Alexey-T arm support was introduced as part of the Android support by Embarcadero. P4D does not support ARM processors before this exension. So, I'm not sure what you meant with "it is now broken after sync...". |
This not a Delphi target, so I do not think you will get much help on this, but it would be nice to get it working. Would be good to know whether it works with the Apple M2. Both Delphi and fpc now support TMethodImplementation (see https://wiki.freepascal.org/FPC_New_Features_3.2.0#Rtti_unit). This would allow to create callbacks without using assembly (see https://en.delphipraxis.net/topic/7143-tmethodimplementation-and-its-uses/). But the announcement says that it is not supported on all platforms. Can you find out for which platforms it is supported? |
Indeed. I have made the same point above. Lucas. has the code been tested with the Apple M2? Would you expect the code to work with any ARM64 processor? |
This is coming from python. (see for instance pandas-dev/pandas#23040) . Why do you think methodcallback.pas is at fault? METH_CLASS and METH_STATIC (see https://docs.python.org/3/c-api/structures.html) are flags that P4D never uses. You could try the MethodCallback tests to see whether it works correctly on your platform. Also you could try and run a simple console application with P4D, executing some simple code (e.g. "print('Hi') to see whether it works.
Did it ever work? Is it using MethodCallBack? |
Yes, with the old version of Python4Lazarus (latter I tried to sync with P4D, and maybe I made mistake) CudaText 1.172 worked on R-Pi-3.
It is used in PythonEngine unit:
|
Will try ! |
It is, but you don't use it in CudaText. You don't create new types and you only use TPythonModule.AddMethod. Put a breakpoint in GetMethodCallback and see whether you hit it. |
Right, IDE don't stop inside GetCallback. False alarm. my mistake is aother one. Closing. |
I sync'ed this unit (in python4lazarus) and now CudaText ARM64 don't work. it shows py error on start.
ValueError: module functions cannot set METH_CLASS or METH_STATIC
I am comparing the new unit with old one (in Python4Lazarus before sync with you).
old unit did not have all variants of
function GetCallBack
.attached this old unit.
MethodCallBack.zip
can you please make sure FPC ARM64 works now?
My device: Raspberry Pi-3, OS: Manjaro ARM.
The text was updated successfully, but these errors were encountered: