nielsAD / lape

Scripting engine with Pascal-like syntax for FPC and Delphi
119 stars 28 forks source link

Fix native callback parameters. #119

Closed ollydev closed 6 years ago

ollydev commented 6 years ago

TLapeType_NativeMethod BaseType is ltUnknown so unable to convert type. Added a VarType check to handle as a pointer.

Seems to fix the issue without breaking anything else i've noticed.

ollydev commented 6 years ago

@nielsAD I added a test. Unable to add a test for method of object callback parameter until this is resolved.

This PR does fix the issue Simba was running into.

ollydev commented 6 years ago

@nielsAD Finished the tests. (used natify rather than native)

This bug can be for another time, I don't see anyone else having a script method with a native method parameter anyway.

nielsAD commented 6 years ago

Thanks!