Jump to content
  • Advertisement
Sign in to follow this  
yeisnier

get name of all functions

This topic is 4091 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This is my C++ code for using LUA.
lua_State *L = lua_open();
luaL_openlibs(L);

luaL_loadfile(L, "..\\printf.lua");

I need to get the name of all functions defined in printf.lua file? thanks ;)

Share this post


Link to post
Share on other sites
Advertisement
The basic idea is to get the global table and enumerate everthing in it. If the type is a function, well, it's a function.

The lua manual has a little section on how to enumerate through a lua table in c code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!