[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua_register() while running script
- From: Markus Ewald <Markus_Ewald@...>
- Date: Fri, 08 Dec 2000 23:04:59 +0100
Yesterday I tried to write a C function ImportSystem() which uses
lua_register() to make some functions available for my scripts. I
planned to export ImportSystem() itself, so each script that needs to
use the System-library could call it. Because LuaC also compiles scripts
without knowing which functions exist and which not, I thought maybe Lua
checks for a symbol just before it is called. Well, it doesn't.
I'm just asking if anyone could imagine a good solution for the problem
(besides letting each function check if it was registered, of couse),
Else I'll have to always register all functions before calling
lua_do...(). I hope this doesn't decrease performance ?
-Markus-