Recent

Author Topic: Lua module  (Read 3631 times)

DirkL

  • Newbie
  • Posts: 2
Lua module
« on: August 07, 2015, 10:15:21 am »
The Lua module supplied with the Free Pascal compiler is very old (Lua 5.1.1), that is maybe about 12 years ago. In the meantime, Lua 5.2 and Lua 5.3 have appeared. For Lazarus a module 'lua53.pas' by Malcome@Japan has appeared, which does not compile on vanilla Free Pascal 5.3. I needed to make the following tweaks:
  1. Remove 'inline' from three function declarations that have open array arguments.
  2. For Linux, add {$linklib dl}.
It would be better if the official Lua module for FPC could be modernized.
 

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12262
  • FPC developer.
Re: Lua module
« Reply #1 on: August 07, 2015, 10:37:44 am »

Some work has to be done:

1. Dynamic library access should be done via unit dynlibs, this makes it portable across *nixes.
2. has it been tested for 64-bit ?
3. check for differences between the two to avoid that you undo fixes to the old code.

then submit it to the bugtracker at http://bugs.freepascal.org or mantis.freepascal.org

DirkL

  • Newbie
  • Posts: 2
Re: Lua module
« Reply #2 on: August 10, 2015, 12:16:56 pm »
I'm mainly a Lua programmer, and only occasionally a Free Pascal programmer (in fact, it's just one large Pascal program that started off in Turbo Pascal on DOS 3.3 twenty years ago and went through an uneasy p2c phase until Free Pascal came to the rescue). I.e. I use this module in order to write as much of the program as possible in Lua rather than in Pascal. I can attend to bringing the issue to the attention of the Lua community, but find myself out of my depth as far as the issues raised by marcov are concerned. The version I made can be found on the Lua Users Wiki [http://lua-users.org/files/wiki_insecure/FreePascal/lua53.pas].

 

TinyPortal © 2005-2018