Nut/OS  4.10.3
API Reference
lrotable.h
Go to the documentation of this file.
00001 // Read-only tables for Lua
00002 
00003 #ifndef lrotable_h
00004 #define lrotable_h
00005 
00006 #include "lua.h"
00007 #include "llimits.h"
00008 #include "lauxlib.h"
00009 
00010 typedef lua_Number luaR_result;
00011 
00012 // A number entry in the read only table
00013 typedef struct
00014 {
00015   const char *name;
00016   lua_Number value;
00017 } luaR_value_entry;
00018 
00019 // A mapping between table name and its entries
00020 typedef struct
00021 {
00022   const char *name;
00023   const luaL_reg *pfuncs;
00024   const luaR_value_entry *pvalues;
00025 } luaR_table;
00026 
00027 luaR_result luaR_findglobal(const char *key, lu_byte *ptype);
00028 int luaR_findfunction(lua_State *L, const luaL_reg *ptable);
00029 luaR_result luaR_findentry(void *data, const char *key, lu_byte *ptype);
00030 
00031 #endif