[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: How know what functions are defined in a lua script ?
- From: Christophe Gimenez <chris@...>
- Date: Tue, 28 Mar 2000 18:06:46 +0200
De: Vincent Penquerc'h [SMTP:email@example.com]
Date: mardi 28 mars 2000 16:41
A: Multiple recipients of list
Objet: RE: How know what functions are defined in a lua script ?
> Is there a way to know (in a C function) what functions had been
> defined in a lua script that have been procedeed by a lua_dofile() ?
If you don't want to use a sort of "registration" system in your scripts,
That's exactly what I'm trying to avoid...
you can list all globals before lua_dofile, do that after as well, and
see what globals were added. You then ask for their type to see if they
are functions. This won't give you any information on their argument
types, though, so it could be dodgy to make an autocall from C...
All the function I try to locate begins by "on_" (they are message handlers)
But how to list the globals ? Is there a way to do that with a lua api function ?
If I must parse myself the lua script I can't because I will use precompiled files.
Honnestly, trying to build a game is a really really hard task ;-)))